Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Active Directory Cookbook for windows server 2003- P21:If you are familiar with the O'Reilly Cookbook format that can be seen in other popular books, such as the Perl Cookbook, Java Cookbook, and DNS and BIND Cookbook, then the layout of this book will not be anything new to you. The book is composed of 18 chapters, each containing 10-30 recipes for performing a specific Active Directory task. Within each recipe are four sections: problem, solution, discussion, and see also. | Table 6-3. ADS_USER_FLAG_ENUM values Name Value Description controller. ADS_UF_DONT_EXPIRE_PASSWD 65536 Password will not expire. ADS_UF_MNS_LOGON_ACCOUNT 131072 MNS logon account. ADS_UF_SMARTCARD_REQUIRED 262144 Smart card is required for log ADS_UF_TRUSTED_FOR_DELEGATION 524288 Allow Kerberos delegation. ADS_UF_NOT_DELEGATED 1048576 Do not allow Kerberos deleg ADS_UF_TRUSTED_FOR_ is enabled. ADS_UF_USE_DES_KEY_ONLY 2097152 Requires DES encryption for ADS_UF_DONT_REQUIRE_PREAUTH 4194304 Account does not require Ke preauthentication for logon. ADS_UF_PASSWORD_EXPIRED 8388608 Read-only flag indicating ac password has expired. Only WinNT provider. ADS_UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION 16777216 Account is enabled for deleg 6.24.4 See Also Recipe 4.12 for setting a bit-flag attribute and MSDN ADS_USER_FLAG_ENUM Recipe 6.25 Setting a User s Account to Expire in the Future 6.25.1 Problem You want a user s account to expire at some point in the future. 6.25.2 Solution 6.25.2.1 Using a graphical user interface 1. Open the Active Directory Users and Computers snap-in. 2. In the left pane right-click on the domain and select Find. 3. Select the appropriate domain beside In. 4. Beside Name type the name of the user you want to modify and click Find Now. 5. In the Search Results double-click on the user. 211 6. Click the Account tab. 7. Under Account expires select the radio button beside End of. 8. Select the date the account should expire. 9. Click OK. 6.25.2.2 Using a command-line interface Valid values for the -acctexpires flag include a positive number of days in the future when the account should expire to expire the account at the end of the day or never to disable account expiration. dsmod user UserDN -acctexpires NumDays 6.25.2.3 Using VBScript This code sets the account expiration date for a user. ----- SCRIPT CONFIGURATION ------- strExpireDate Date e.g. 07 10 2004 strUserDN UserDN e.g. cn rallen ou Sales dc rallencorp dc com ----- END CONFIGURATION .