Dsquery Dsmod Example
Dsquery Dsmod Example
* Items in "Yellow" are security attributes and must not conflict with each other, and may be left blank. * The last column on this sheet, "Purple", is the command line result which can be copied and pasted directly into com SAMID (This field should not be edited unless you are adding users. Copy and paste the "DEFAULT VALUES" line when adding users, or the formulas on this sheet may be broken) tjohns bfloyd rmiller klangley DEFAULT VALUES DEFAULT VALUES DEFAULT VALUES
AccountExpires (number of days, "never", 0 which means end of today, or blank) Never Never 0 Never Never Never
ch other, and may be left blank. hich can be copied and pasted directly into command prompt.
CanChangePassword ? (must not conflict with column Ecan be "Yes, "No", or blank) Yes Yes No Yes Yes Yes
MiddleInitial E O
WebPageURL
Mobile
Fax 222-111-9999
444-222-1111
333-222-1111 666-555-4321
COMMAND LINE dsquery user -samid tjohns | dsmod user -disabled "No" -acctexpires "Never" -mustchpwd "No" -canchpwd "Yes" -empid "1424 dsquery user -samid bfloyd | dsmod user -disabled "No" -acctexpires "Never" -mustchpwd "No" -canchpwd "Yes" -empid "0525 dsquery user -samid rmiller | dsmod user -disabled "Yes" -empid "0662" -fn "Regina" -mi "O" -ln "Miller" -dept "Customer Care" dsquery user -samid klangley | dsmod user -acctexpires "0" -mustchpwd "No" -canchpwd "No" -empid "0221" -fn "Katrina" -ln "L
hpwd "Yes" -empid "1424" -fn "Terry" -mi "E" -ln "Johns" -dept "Human Resources" -title "Director" -office "Kansas" -desc "Human Resources hpwd "Yes" -empid "0525" -fn "Barry" -ln "Floyd" -mgr "Elvis Presley" -dept "Information Services" -title "Manager" -office "Florida" -desc "Info r" -dept "Customer Care" -title "Representative" -office "Florida" -desc "Customer Care Representative in Florida" -display "Regina O Miller" "0221" -fn "Katrina" -ln "Langley" -dept "Data Entry" -title "Clerk" -office "Georgia" -desc "Data Entry Clerk in Georgia" -display "Katrina Lang
ice "Kansas" -desc "Human Resources Director in Kansas" -display "Terry E Johns" -tel "555-666-1212" "Manager" -office "Florida" -desc "Information Services Manager in Florida" -display "Barry Floyd" -tel "555-666-1213" -fax "222-111-9999" e in Florida" -display "Regina O Miller" -mobile "333-222-1111" Clerk in Georgia" -display "Katrina Langley" -tel "555-666-1215" -hometel "444-222-1111" -mobile "666-555-4321"