Now let us check how to use usermod command with a few practical examples. Sets the new numerical value of the user’s UID Transfers the content of user’s home directory to a new directory Specifies the new GROUP that the user will be added. The expiry date is set in the YYYY-MM-DD format. Sets expiry date and specifies the date which the user account will be disabled. Here are some of the commonly used usermod command options: OptionsĪdds a user to a secondary group. The usermod command is a privileged command, only the root user or sudo users can successfully run execute the command. Usermod command takes the following syntax: usermod USER Once you execute the usermod command, the command modifies the user account information in the specified files. In Linux systems, information about user accounts is typically recorded in the /etc/passwd, /etc/group, /etc/fs, /etc/gshadow and /etc/shadow configuration files. It can modify user account attributes such as group, user information, home directory, login shell, UID, expiry date. The Linux usermod command is a command-line tool that is used to modify the properties of a user in a Linux system. A user with sudo access or root account.In this tutorial, we learn how to use usermod command in Linux. For an existing user in Linux, if you wish to change those attributes, you need usermod command. User accounts have attributes such as group, user information, home directory, login shell, UID, expiry date.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |