1SMBLDAP-USERMOD(8) User Contributed Perl Documentation SMBLDAP-USERMOD(8)
2
3
4
6 smbldap-usermod - Modify a user account
7
9 smbldap-usermod [-c gecos] [-d home_dir] [-r login_name] [-u uid] [-g
10 gid] [-o] [-G group[,...]] [-s shell] [-N first_name] [-S surname] [-P]
11 [-M mail[,...]] [-T mail,[..]] [--shadowExpire date/n] [--shadowMax n]
12 [--shadowMin n] [--shadowInactive n] [--shadowWarning n] [-L] [-U] [-a]
13 [-e expiration_date/n] [--sambaExpire date/n] [-A canchange] [-B
14 mustchange] [-C smbhome] [-D homedrive] [-E scriptpath] [-F
15 profilepath] [-H acctflags] [-I] [-J] [-h] login
16
18 The smbldap-usermod command modifies the system account files to
19 reflect the changes that are specified on the command line.
20
21 UNIX options
22 -c, --gecos gecos
23 The new value of the user's comment field (gecos). (Don't use this
24 to modify displayName or cn. Use -N and -S options combined instead).
25
26 -d, --homedir home_dir
27 The user's new login directory.
28
29 -r, --rename new_user
30 Allow to rename a user. This option will update the dn attribute
31 for the user. You can also update others attributes using the
32 corresponding script options.
33
34 -u, --uid uid
35 The numerical value of the user's ID. This value must be
36 unique, unless the -o option is used. The value must be non
37 negative. Any files which the user owns and which are located in
38 the directory tree rooted at the user's home directory will have the
39 file user ID changed automatically. Files outside of the user's
40 home directory must be altered manually.
41
42 -o, --canBeNotUnique
43 uidNumber can be non unique
44
45 -g, --gid initial_group
46 The group name or number of the user's new initial login group.
47 The group name must exist. A group number must refer to an already
48 existing group. The default group number is 1.
49
50 -G, --group [+-]group,[...]
51 A list of supplementary groups which the user is also a member
52 of. Each group is separated from the next by a comma, with no
53 intervening whitespace. The groups are subject to the same
54 restrictions as the group given with the -g option. If the user is
55 currently a member of a group which is not listed, the user will be
56 removed from the group, unless the '+' or '-' caracter is used to add
57 or remove groups to inital ones.
58
59 -s, --shel shell
60 The name of the user's new login shell. Setting this field to
61 blank causes the system to select the default
62 login shell.
63
64 -N, --givenName
65 set the user's given name (attribute givenName). Additionally used
66 to set the first name in displayName and cn.
67
68 -S, --surname
69 Set the user's surname (attribute sn). Additionally used to set the
70 last name in displayName and cn.
71
72 -P
73 End by invoking smbldap-passwd to change the user password (both
74 unix and samba passwords)
75
76 -M, --mailAddresses mail,[...]
77 mailAddresses (comma seperated)
78
79 -T, --mailToAddress mail,[...]
80 mailToAddress (forward address) (comma seperated)
81
82 --shadowExpire <YYYY-MM-DD/n>
83 Set the expiration date for the user password. This only affect
84 unix account. The date may be specified as either YYYY-MM-DD or 'n'
85 days from day. The 'n' syntax also supports the extended format
86 (#y)(#m)(#d) for years, months, and days from today. One need not
87 specify all three, so all of the following are examples of valid input:
88 '5y4m2d' (5 years, 4 months, and 2 days), '5y' (5 years), '5y2d' (5
89 years and 2 days), and '3' (3 days). This option calls the internal
90 'timelocal' command to set calculate the number of seconds from Junary
91 1 1970 to the specified date.
92
93 --shadowMax <n>
94 User must change the password, at least, every 'n' days
95
96 --shadowMin <n>
97 User must wait 'n' days once the password has changed before
98 changing it again
99
100 --shadowInactive <n>
101 Number of days of inactivity allowed for the specified user
102
103 --shadowWarning <n>
104 User is warned that the password must be changed four days before
105 the password expires
106
107 -L, --shadowLock
108 Lock unix user's password. This puts a '!' in front of the
109 encrypted password, effectively disabling the password.
110
111 -U, --shadowUnlock
112 Unlock unix user's password. This removes the '!' in front of the
113 encrypted password.
114
115 SAMBA options
116 -a, --addsambaSAMAccount
117 Add the sambaSAMAccount objectclass to the specified user account.
118 This allow the user to become a samba user.
119
120 -e, --expire <YYYY-MM-DD(HH:MM:SS)/n>
121 Sets the expiration for both samba (--sambaExpire) and shadow
122 (--shadowExpire).
123
124 --sambaExpire <YYYY-MM-DD HH:MM:SS/n>
125 Set the expiration date for the user account. This only affects the
126 samba account. The date must be in the following format: YYYY-MM-DD
127 HH:MM:SS. The n-days format of shadowExpire is also supported. This
128 option uses the internal 'timelocal' command to set calculate the
129 number of seconds from Junary 1 1970 to the specified date.
130
131 -x
132 Creates rid and primaryGroupID in hex instead of decimal (for Samba
133 2.2.2 unpatched only - higher versions always use decimal)
134
135 -A, --sambaPwdCanChange
136 can change password ? 0 if no, 1 if yes
137
138 -B, --sambaPwdMustChange
139 must change password ? 0 if no, 1 if yes
140
141 -C, --sambaHomePath path
142 sambaHomePath (SMB home share, like '\\\\PDC-SRV\\homes')
143
144 -D, --sambaHomeDrive drive
145 sambaHomeDrive (letter associated with home share, like 'H:')
146
147 -E, --sambaLogonScript script
148 sambaLogonScript, relative to the [netlogon] share (DOS script to
149 execute on login, like 'foo.bat')
150
151 -F, --sambaProfilePath path
152 sambaProfilePath (profile directory, like
153 '\\\\PDC-SRV\\profiles\\foo')
154
155 -H, --sambaAcctFlags flags
156 sambaAcctFlags, spaces and trailing bracket are ignored (samba
157 account control bits like '[NDHTUMWSLKI]')
158
159 -I, --sambaDisable
160 disable user. Can't be used with -H or -J
161
162 -J, --sambaEnable
163 enable user. Can't be used with -H or -I
164
165 -h, --help
166 print this help
167
169 usermod(1)
170
171
172
173perl v5.12.3 2011-03-07 SMBLDAP-USERMOD(8)