DSQUERY USER -samid %1 | DSGET USER -memberof -expand
In this case, you pass the user??™s logon name to the DSQuery User object. The DSGet utility
receives the output from DSQuery through a pipe (|). The DSGet User object then displays the
group membership for the user and expands the information so you get all of the details.
Resetting a User??™s Password
One of the tasks that administrators love least, yet perform most often, is resetting a user??™s password.
Those users who don??™t keep their password recorded on a sticky note next to their monitor
are prone to forgetting them. After a long weekend or a holiday, the administrator??™s office suddenly
fills with users who have no clue as to what their password is. You could use a graphical utility
to reset those passwords one at a time (wasting an entire morning as a result) or you can use this
simple script to reset the password based on the user??™s logon name.
DSQUERY USER -samid %1 | DSMOD USER -pwd ???newpassword???
In this case, the DSQuery User object obtains the user??™s information based on the logon name
and passes it to the DSMod utility through a pipe (|). The DSMod User object uses the -pwd command
line switch to change the user??™s password to newpassword.
Pages:
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154