os:win:ad
Различия
Показаны различия между двумя версиями страницы.
Предыдущая версия справа и слеваПредыдущая версияСледующая версия | Предыдущая версия | ||
os:win:ad [04.05.2022 13:00] – [ADSI] viacheslav | os:win:ad [30.07.2024 19:21] (текущий) – внешнее изменение 127.0.0.1 | ||
---|---|---|---|
Строка 1: | Строка 1: | ||
+ | ===== Делегирование ===== | ||
+ | Дать права на разблокировку объекта: | ||
+ | Write **lockoutTime** | ||
+ | |||
+ | На включение-выключение: | ||
+ | Write **userAccountControl** | ||
+ | |||
+ | Move Computer accounts between OUs:\\ | ||
+ | |||
+ | In ADUC, right click the first OU and select Delegate Control. | ||
+ | - Add the user or group you want. | ||
+ | - Select the “Create a custom task to delegate” option and click Next. | ||
+ | - Select “Only the following objects in the folder” | ||
+ | - Check the box before “Computer objects” in the list. | ||
+ | - Check the box before “Create selected objects in this folder” and “Delete selected objects in this folder”. Click Next. | ||
+ | - Check the box for “Write”. | ||
+ | - Click Next and Finish. | ||
+ | - Perform the same steps on another OU. | ||
+ | https:// | ||
+ | |||
+ | ===== ADSI ===== | ||
+ | <code powershell> | ||
+ | $object.attribute = " | ||
+ | # and | ||
+ | $object.Put(" | ||
+ | </ | ||
+ | They both perform the same function in that the attribute is assigned a value. The question was whats the difference and which should you use. The question also noted that when creating objects they behave differently. | ||
+ | |||
+ | <code powershell> | ||
+ | $ou = [ADSI]" | ||
+ | |||
+ | $user1 = $ou.create(" | ||
+ | $user1.description = "test 39" | ||
+ | $user1.setinfo() | ||
+ | Exception calling " | ||
+ | (Exception from HRESULT: 0x8007202F)" | ||
+ | At line:1 char:15 | ||
+ | + $user1.setinfo <<<< | ||
+ | |||
+ | $user2 = $ou.create(" | ||
+ | $user2.Put(" | ||
+ | $user2.setinfo() | ||
+ | |||
+ | $user1 = $ou.create(" | ||
+ | $user1.setinfo() | ||
+ | $user1.description = "test 59" | ||
+ | $user1.setinfo() | ||
+ | |||
+ | $user1 = $ou.create(" | ||
+ | $user1.setinfo() | ||
+ | $user1.description = "test 59" | ||
+ | $user1.setinfo() | ||
+ | </ | ||
+ | We start as normal by creating an object for the OU to contain the user. We then use the create method to create the user. If we try to set the description (or any other attribute) and then call setinfo() we get the error shown. | ||
+ | |||
+ | https:// | ||
+ | |||
+ | ===== Домашняя папка (Home folder) ===== | ||
+ | Создать каталог, | ||
+ | |||
+ | Расшарить как, например, | ||
+ | |||
+ | NTFS-права: | ||
+ | * Everyone: Traverse folder/ | ||
+ | * Creator owner: Full control (Subfolders and files only) | ||
+ | * SYSTEM: Full control | ||
+ | * Administrators: | ||
+ | * Остальных удалить. | ||
+ | |||
+ | В AD на вкладке профиля выбрать букву и прописать всем пользователям '' | ||
+ | |||
+ | https:// | ||
+ | |||
+ | ===== Офлайн-присоединение к домену ===== | ||
+ | <code powershell> | ||
+ | # На DC или админской машине (комп окажется в контейнере Computers в AD) | ||
+ | djoin.exe /provision /domain example.com /machine vmws-srv1 /savefile c: | ||
+ | # На сервере, | ||
+ | djoin.exe /requestodj /loadfile < | ||
+ | # Перезагрузить сервер, | ||
+ | </ | ||