Home Download Ubuntu

All parameters options for users and groups managing commands in Ubuntu

Ubuntu is a multi-user operating system. This means that more than one user can be actively logged and using the system at any one time. Obviously, it makes sense for each user to have their own user account and home directory, and for different users to have different privileges.

The commands used here are: "useradd, usermod, userdel, groupadd, groupmod, groupdel".

Useradd

Usage: useradd [options] LOGIN

Options:
-b, --base-dir BASE_DIRbase directory for the new user account home directory
-c, --comment COMMENTset the GECOS field for the new user account
-D, --defaultsprint or save modified default useradd configuration
-e, --expiredate EXPIRE_DATEset account expiration date to EXPIRE_DATE
-f, --inactive INACTIVEset password inactive after expiration to INACTIVE
-g, --gid GROUPforce use GROUP for the new user account
-G, --groups GROUPSlist of supplementary groups for the new user account
-h, --helpdisplay this help message and exit
-k, --skel SKEL_DIRspecify an alternative skel directory
-K, --key KEY=VALUEoverrides /etc/login.defs defaults
-l, --no-log-initdo not add the user to the lastlog and faillog databases
-m, --create-homecreate home directory for the new user account
-M, --no-create-homedo not create user's home directory (overrides /etc/login.defs)
-N, --no-user-groupdo not create a group with the same name as the user
-o, --non-uniqueallow create user with duplicate (non-unique) UID
-p, --password PASSWORDuse encrypted password for the new user account
-r, --systemcreate a system account
-s, --shell SHELLthe login shell for the new user account
-u, --uid UIDforce use the UID for the new user account
-U, --user-groupcreate a group with the same name as the user
-Z, --selinux-user SEUSERuse a specific SEUSER for the SELinux user mapping


Usermod

Usage: usermod [options] LOGIN

Options:
-c, --comment COMMENTnew value of the GECOS field
-d, --home HOME_DIRnew home directory for the user account
-e, --expiredate EXPIRE_DATEset account expiration date to EXPIRE_DATE
-f, --inactive INACTIVEset password inactive after expiration to INACTIVE
-g, --gid GROUPforce use GROUP as new primary group
-G, --groups GROUPSnew list of supplementary GROUPS
-a, --appendappend the user to the supplemental GROUPS mentioned by the -G option without removing him/her from other groups
-h, --helpdisplay this help message and exit
-l, --login NEW_LOGINnew value of the login name
-L, --locklock the user account
-m, --move-homemove contents of the home directory to the new location (use only with -d)
-o, --non-uniqueallow using duplicate (non-unique) UID
-p, --password PASSWORDuse encrypted password for the new password
-s, --shell SHELLnew login shell for the user account
-u, --uid UIDnew UID for the user account
-U, --unlockunlock the user account
-Z, --selinux-usernew SELinux user mapping for the user account


Userdel

Usage: userdel [options] LOGIN

Options:
-f, --forceforce removal of files, even if not owned by user
-h, --helpdisplay this help message and exit
-r, --removeremove home directory and mail spool


groupadd

Usage: groupadd [options] GROUP

Options:
-f, --forceforce exit with success status if the specified group already exists
-g, --gid GIDuse GID for the new group
-h, --helpdisplay this help message and exit
-K, --key KEY=VALUEoverrides /etc/login.defs defaults
-o, --non-uniqueallow create group with duplicate (non-unique) GID
-p, --password PASSWORDuse encrypted password for the new group
-r, --systemcreate a system account


groupmod

Usage: groupmod [options] GROUP

Options:
-g, --gid GIDforce use new GID by GROUP
-h, --helpdisplay this help message and exit
-n, --new-name NEW_GROUPforce use NEW_GROUP name by GROUP
-o, --non-uniqueallow using duplicate (non-unique) GID by GROUP
-p, --password PASSWORDuse encrypted password for the new password


groupdel

Usage: groupdel group

Resources: techotopia.com

0 comments:

Post a Comment