Vitalnix : User Management Suite
  manual v1.0.25.0

Overview

The Vitalnix architecture document shows that previously, each facility (Shadow, LDAP, Samba, etc.) required its own utilities like login, passwd, useradd, to name a few. Vitalnix itself adds its utilities, but tries to obsolete all others at the same time.

The utilities provided with Vitalnix try to behave like the ones from the Shadow Password Suite package, to ensure compatibility. Plus, they have some new options, too.

NOTE: Configuration files are read from sysprog/../vetc/, too (if they exist there). Why not simply vetc/ you may ask? Because the former gives us a bit more security when you have a random file which has exactly our name.

Positional "%" parameters

Please also consider reading the printf(3) manual if you do not know about these.

By default, the arguments are used in the order given. One can also specify explicitly which argument is taken, at each place where an argument is required, by writing %pm, where p is the argument number and m the modifier. For example: printf("Group: %2s, GID: %1ld\n", gid, group);. It is used for the AC_*, -A and -B commands/options in some of the following programs.

Notes

Due to the fact that most programs listed here must coexist with their old counterparts (from shadow), they have been prepended with a V (to indicate Vitalnix).
2. Some options may not be currently available due to development. They are silently ignored.

useradd - Create a new user

vuseradd [-A [command]] [-B [command]] [-I] [-M backend] [-S] [-G group[,...]] [-c comment] [-d home_dir] [-e expiry_date] [-f inactive_days] [-g group] [-m [-k skel_dir]] [-p passwd] [-s shell] [-u uid [-o]|-r] login
-A [command] Runs the specified command after the user was successfully added. command is a string with printf(3)-style %1 positional parameters. If -A is given, but without a command, the default command in the configuration file is not run.
-B [command] Runs the specified command before the user is added. It is run always, even if adding fails. command is a string with printf(3)-style %1 positional parameters. If -B is given, but without a command, the default command in the configuration file is not run.
-I Interactively prompt for the new user's parameters
-M backend Uses the specified backend rather than the default one listed in the ACCDB configuration file
-S Uses the "split home" feature. This will create the home directory as /home/u/username rather than the default /home/username. Specifying -S twice will result in a two-level split, i.e. /home/u/us/username. The -d option overrides this one.
-G group[,...] The supplemental (secondary) groups the user is a member in, separated by comma. group can either be the group's name or its GID. (UNSUPPORTED)
-c comment The comment field for the new user. It can be in turn again split up in fields, separated by comma. Usually, the real name of the user is stored in the first field, the others are left for other commentary or data.
-d dir The new user will get dir as his home directory. This option alone does not create his home directory, but rather only writes that directory information into the user database. You usually want to pass -m also along to create the directory. This option overrides -S.
-e day Date on which the account expires. Date formats can be DD.MM.YYYY, MM/DD/YYYY or YYYY-MM-DD. The default is to not let expire the account.
-f days The number of days which need to pass after a password expiration (that is not -e!) until the account is locked down.
-g group The group name or number of the user's initial (primary) group. group can either be the group's name or its GID.
-k dir The skeleton directory to use for the new user. Contents from this directory will be copied into the user's.
-m Create the user's home directory. The default is to create a directory called the same name as the user in /home, or what you specified as HOME in the configuration file, or if you passed -S or -d. If this option is given, an implicit -k /etc/skel takes effect, unless an explicit -k is specified.
-o If a user with the explicit UID given by -u already exists, you can override the error message with this option, to create non-unique UIDs.
-p pass The password to use for the new user. It must already be encrypted when passed with -p.
-r Create a system user, that is, with a lower UID than the hardcoded default (100), or what is specified for MIN_UID in the autouid configuration file. The -u option overrides this one.
-s shell Use shell as the default command interpreter for the new user. The default is /bin/bash or whatever you specified as SHELL in the configuration file.
-u uid The numerical user id of the new user. The default is to assign the user the next greatest UID. This option overrides -r.

useradd will create a new user using the supplied parameters, and, if -I is given, interactively asks the user for them. In interactive mode, each specified option is printed with a default value in square brackets. If an empty string is entered, the default value is taken. The -A, -B, -I, -M and -S options are unique to Vitalnix. Shadow's -D option is explicitly not provided. The configuration file for useradd is sysprog/../vetc/useradd.conf, or /etc/useradd.conf.

usermod - Modify a user account

vusermod [-A [command]] [-B [command]] [-M backend] [-G group,[...]] [-L] [-U] [-c comment] [-d home_dir [-m]] [-e expiry_date] [-f inactive_days] [-g initial_group] [-G group,[...]] [-l login_name] [-p passwd] [-s shell] [-u uid [-o]] login
-A [command] Runs the specified command after the user was successfully modified. command is a string with printf(3)-style %1 positional parameters. If -A is given, but without a command, the default command in the configuration file is not run.
-B [command] Runs the specified command before the user is modifed. It is run always, even if adding fails. command is a string with printf(3)-style %1 positional parameters. If -B is given, but without a command, the default command in the configuration file is not run.
-I Interactively prompt for the new parameters
-M backend Uses the specified backend rather than the default one listed in the ACCDB configuration file
-G group[,...] Changes the user's info about which supplemental (secondary) groups he belongs to. Note that this will cancel his membership in any of the groups not specified, so you to add a user to another group, you need to run usermod with -G first and the second time with -G first,second. (UNSUPPORTED)
-L Lock the user's account (prohibit logins) (UNSUPPORTED)
-U Unlock the user's account (UNSUPPORTED)
-c comment Changes the comment (GECOS) field
-d home Changes the home directory as found in the user database. Also see -m.
-e expiry_date The new date on which the user account will expire. Valid formats are DD.MM.YYYY, MM/DD/YYYY and YYYY-MM-DD.
-f days The number of days which need to pass after a password expiration (that is not -e!) until the account is locked down.
-g group Changes the users initial (primary) group
-l login Changes the login name for the user, which must be unique.
-m When -d is given, specifying -m will move data from the old home directory into the new one, necessarily creating the new directory if it does not exist yet. (UNSUPPORTED)
-o If a user with the explicit UID given by -u already exists, you can override the error message with this option, to create non-unique UIDs.
-p password Change the users password to the one specified. password needs to be in encrypted form.
-s shell Changes the user's default shell
-u uid Changes the user's identification number. It must be unique, unless -o is given.

usermod updates the user's account with the information given on the command line. Not specified options will not change the corresponding account field. If -I is passed, the user is interactively asked for what parameters shall be changed, by presenting a default value, which he may either accept (by leaving the answer empty) or specifying a new value. The -A, -B, -I, and -M options are unique to Vitalnix. The configuration file for useradd is sysprog/../vetc/usermod.conf, or /etc/usermod.conf.

userdel - Delete a user account

vuserdel [-A [command]] [-B [command]] [-M backend] [-r] login
-A [command] Runs the specified command after the user was successfully added. command is a string with printf(3)-style %1 positional parameters. If -A is given, but without a command, the default command in the configuration file is not run.
-B [command] Runs the specified command before the user is added. It is run always, even if adding fails. command is a string with printf(3)-style %1 positional parameters. If -B is given, but without a command, the default command in the configuration file is not run.
-M backend Uses the specified backend rather than the default one listed in the ACCDB configuration file
-r Removes the user's home directory including files located therein and its mail spool (assuming /var/spool/mail/).

userdel deletes the specified user. The -A, -B and -M options are unique to Vitalnix. The configuration file for userdel is sysprog/../vetc/userdel.conf, or /etc/userdel.conf.

groupadd - Create a new group

vgroupadd [-A [command]] [-B [command]] [-I] [-M backend] [-g gid [-o]|-r] group
-A [command] Runs the specified command after the group was successfully added. command is a string with printf(3)-style %1 positional parameters. If -A is given, but without a command, the default command in the configuration file is not run.
-B [command] Runs the specified command before the group is added. It is run always, even if adding fails. command is a string with printf(3)-style %1 positional parameters. If -B is given, but without a command, the default command in the configuration file is not run.
-I Interactively prompt for the new group's parameters
-M backend Uses the specified backend rather than the default one listed in the ACCDB configuration file
-g gid The numerical group identification number of the new group. The default is to assign the user the next greatest GID available. This option overrides -r.
-o If a group with the explicit GID given by -g already exists, you can override the error message with this option, to create non-unique GIDs.
-r Create a system group, that is, with a lower GID than the hardcoded default (100), or what is specified for MIN_GID in the autouid configuration file. The -g option overrides this one.

groupadd will create a new group using the supplied parameters, and, if -I is given, interactively asks the user for them. In interactive mode, each specified option is printed with a default value in square brackets. If an empty string is entered, the default value is taken. The -A, -B, -I, and -M options are unique to Vitalnix. The configuration file for groupadd is sysprog/../vetc/groupadd.conf, or /etc/groupadd.conf.

groupmod - Modify a group

vgroupmod [-A [command]] [-B [command]] [-I] [-M backend] [-g gid [-o]] [-n group_name] group
-A [command] Runs the specified command after the group was successfully added. command is a string with printf(3)-style %1 positional parameters. If -A is given, but without a command, the default command in the configuration file is not run.
-B [command] Runs the specified command before the group is added. It is run always, even if adding fails. command is a string with printf(3)-style %1 positional parameters. If -B is given, but without a command, the default command in the configuration file is not run.
-I Interactively prompt for the new group's parameters
-M backend Uses the specified backend rather than the default one listed in the ACCDB configuration file
-g gid Changes the user's identification number. It must be unique, unless -o is given.
-o If a group with the explicit GID given by -g already exists, you can override the error message with this option, to create non-unique GIDs.
-n name Changes the group's name, which must be unique.

groupmod updates the group's info with the data given on the command line. Not specified options will not change the corresponding fields in the database. If -I is passed, the user is interactively asked for what parameters shall be changed, by presenting a default value, which he may either accept (by leaving the answer empty) or specifying a new value. The -A, -B, -I, and -M options are unique to Vitalnix. The configuration file for groupmod is sysprog/../vetc/groupmod.conf, or /etc/groupmod.conf.

groupdel - Delete a group

vgroupdel [-A [command]] [-B [command]] [-F] [-M backend] group
-A [command] Runs the specified command after the group was successfully added. command is a string with printf(3)-style %1 positional parameters. If -A is given, but without a command, the default command in the configuration file is not run.
-B [command] Runs the specified command before the group is added. It is run always, even if adding fails. command is a string with printf(3)-style %1 positional parameters. If -B is given, but without a command, the default command in the configuration file is not run.
-F userdel will, by default, not delete any groups, of which a user is a primary member of. -F forces to delete the group.
-I Interactively prompt for the new group's parameters
-M backend Uses the specified backend rather than the default one listed in the ACCDB configuration file

groupdel deletes the specified group, but will take care for whether any use has that group as a primary group set. All options provided are unique to Vitalnix. The configuration file for groupdel is sysprog/../vetc/groupdel.conf, or /etc/groupdel.conf.


March 09 2004 http://vitalnix.sf.net/