Auto Install for Mandrakelinux | ||
---|---|---|
Prev | Next |
This option is used to add users to the system.
'users' => [ |
{ |
'name' => 'tom', |
'uid' => '5000', |
'gid' => '5000', |
'realname' => 'Tomas Wild', |
'pw' => '$1$XHDtOdGw$kBibHl2otqOVEnBIumdgR/', |
or |
'password' => 'psbcr!', |
'shell' => '/bin/bash', |
'home' => '/home/tom', |
'icon' => 'ic-bird', |
'groups' => [] |
} |
], |
Descriptions:
'name' |
the log in user name (REQUIRED). DrakX adds an entry to the /etc/passwd file using the value specified here, along with uid, gid, realname, home and shell. See man passwd. |
'uid' |
user id number (optional, if omitted then the default begins at the value for USER in the file /etc/defaults/useradd and increments for each successive user). |
'gid' |
group ID number (optional, if omitted then the default begins at the value for GROUP in the file /etc/defaults/useradd and increments for each successive user). DrakX updates the /etc/group file with an entry containing a group name, the same as 'name' above, and the 'gid' specified here or automatically generated. |
'realname' |
usually the user's full name, but can be anything you want. (optional, can be omitted) |
|
NOTE: use either 'pw' or 'password' - but NOT both. |
'pw' |
this is the encrypted form of the password. Its contents are dependent on the authentication used. If using MD5 and Shadow, then copy it from /etc/shadow. |
'password' |
this is the clear text form of the password. Just what ever you want. |
'shell' |
the path name and
shell program to use when a user logs in. (Optional, defaults to
/bin/bash /bin/csh /bin/sh /bin/ksh |
'home' |
where the users home directory is. (Optional, defaults to /home/<name> ). |
'icon' |
if present, is the filename (no extension) containing the desired icon. These icons are located in: /usr/share/mdk/faces. |
'groups' |
if present, is a list of supplemental groups that this user is to be added to. You may specify either numeric gid's or text group names. DrakX will automatically add the user to the groups listed and remove the user from any groups not listed. NOTE: the group name or gid listed must already exist in the /etc/group file. |
DrakX's default for the text group name is to use the 'name' value. This option works OK if you do not want specific text names for the GID. However, if you do want specific text names, then add the users that you want and modify the /etc/group file manually after the system is started. Alternately, you could use the 'postInstall' option to automate the fix up.
Examples:
'users' => [], means do not create any user accounts. |
An example to illustrate the 'groups' feature: |
'users' => [ |
{ |
'name' => 'tom', |
'uid' => '5000', |
'gid' => '5000', |
'realname' => 'Tomas Wild', |
'pw' => '$1$XHDtOdGw$kBibHl2otqOVEnBIumdgR/', |
'shell' => '/bin/bash', |
'home' => '/home/tom', |
'icon' => 'ic-fish', |
'groups' => [ 'disk', '80' ] |
} |
], |
A simple example to add new groups (no user) and then add a user to the new groups, change and existing group name to a different name:
'postInstall' => " |
# add some groups |
groupadd -g 4001 g_special |
groupadd -g 4002 g_new_special |
usermod -G special,new_special,disk,80 tom |
groupmod -n g_david david |
" |
Related Option Entries:
authentication, autologin, superuser, postInstall
Prev | Home | Next |
timezone | useSupermount |