Есть ли способ автоматически поместить компьютер в определенное подразделение на основе пользователя, который присоединил его к домену? Например, у меня есть 5 OU, и администраторы сайтов могут добавлять компьютеры в домен, но не могут управлять какими-либо аспектами AD за пределами своего OU, и мы хотим предотвратить необходимость перемещения компьютеров в правильное OU.
Я знаю о возможности изменять глобальное расположение новых компьютеров в AD, а также предварительно добавлять их в правильное подразделение, но ищу что-то более конкретное, если оно существует.
Попросите их использовать netdom для присоединения машины к определенному OU, которым они управляют:
netdom help join
The syntax of this command is:
NETDOM JOIN machine /Domain:domain [/OU:ou path] [/UserD:user]
[/PasswordD:[password | *]]
[/UserO:user] [/PasswordO:[password | *]]
[/PasswordM:[password | *]]
[/ReadOnly]
[/REBoot[:Time in seconds]]
[/SecurePasswordPrompt]
NETDOM JOIN Joins a workstation or member server to the domain.
machine is the name of the workstation or member server to be joined
/Domain Specifies the domain which the machine should join. You
can specify a particular domain controller by entering
/Domain:domain\dc. When /ReadOnly option is used, you
must specify a domain controller.
/UserD User account used to make the connection with the domain
specified by the /Domain argument
/PasswordD Password of the user account specified by /UserD. A * means
to prompt for the password
/UserO User account used to make the connection with the machine to
be joined
/PasswordO Password of the user account specified by /UserO. A * means
to prompt for the password
/OU Organizational unit under which to create the machine account.
This must be a fully qualified RFC 1779 DN for the OU.
If not specified, the account will be created under the default
organization unit for machine objects for that domain.
/PasswordM Password of the pre-created computer account, whose name is
specified by the machine parameter. A * means to prompt
for the password. This option must be used with /ReadOnly
option.
/ReadOnly Perform a domain join using a pre-created computer account and
without performing any writes to a domain controller. This
option therefore, does not require a writable domain controller.
You must specify the domain controller (using /Domain option)
and computer account password (using /PasswordM option)
when the option is used. This option cannot be used with /OU
option.
/REBoot Specifies that the machine should be shutdown and automatically
rebooted after the Join has completed. The number of seconds
before automatic shutdown can also be provided. Default is
30 seconds
/SecurePasswordPrompt
Use secure credentials popup to specify credentials. This
option should be used when smartcard credentials need to be
specified. This option is only in effect when the password
value is supplied as *
Windows Professional machines with the ForceGuest setting enabled (which is the
default for machines not joined to a domain during setup) cannot be remotely
administered. Thus the join operation must be run directly on the machine
when the ForceGuest setting is enabled.
When joining a machine running Windows NT version 4 or before to the domain
the operation is not transacted. Thus, a failure during the operation could
leave the machine in an undetermined state with respect to the domain it is
joined to.
The act of joining a machine to the domain will create an account for the
machine on the domain if it does not already exist.
NETDOM HELP command | MORE displays Help one screen at a time.
Не уверен, что является более конкретным, чем предварительная подготовка компьютерных объектов в правильном OU. Если вы уже делегировали это право администраторам, это будет самый быстрый / простой способ. Вы можете использовать команду netdom, как указал Джим, но для этого необходимо каждый раз вводить правильный путь LDAP, что подвержено ошибкам.
РЕДАКТИРОВАТЬ:
Другой альтернативой, если у вас есть контроллер домена Server 2008 R2 и вы добавляете серверы Server 2008 R2 или клиенты Windows 7, является использование автономного присоединения к домену.
Администраторы должны будут подготовить компьютерный объект, используя следующее в Windows 7 или Server 2008 R2:
djoin /provision /Domain <domain> /Machine <PCName> /MachineOU <ldap Path> /Savefile <PCName>.txt
Затем они могли скопировать файл на компьютер для добавления и запустить:
djoin /RequestODJ /loadfile <PCName>.txt /Windowspath C:\Windows
Это можно использовать для добавления ПК в домен, когда он не имеет сетевого подключения.
Вы можете использовать функцию делегирования управления в активном каталоге, чтобы применить разрешения к каждому конкретному подразделению, в которое вы хотите, чтобы ваши ребята перетаскивали свои компьютеры. Во-первых, будьте осторожны, у них не может быть разрешения на добавление компьютерных объектов где-либо еще в домене, иначе он выберет первое найденное OU (я думаю!?!).
Например, предположим, что у вас есть подразделение Other_Computers. 1. Щелкните его правой кнопкой мыши, выберите «Делегировать управление», нажмите «Далее», а затем выберите пользователя, которому вы хотите передать управление.
Как только вы это сделаете, предполагая, что у пользователя нет прав на добавление объекта-компьютера в другое место в домене, любые добавленные им компьютеры будут автоматически добавлены в это подразделение.