The /etc/passwd file contains the user’s information. The
fields include the user name, x for password, user identifier, group identifier, gecos for comment, home directory, and shell. The colon is for separating the fields.
The /etc/shadow file contains the encrypted password.
The /etc/group file contains the group information. There are four fields; these are the group name, password, identifier, and a comma separated list of members.
Maintaining User Information from the Command-Line
useradd
To add a single user, to the system.
usermod
To modify the information, for an existing user.
userdel
To remove an existing user.
groupadd
To add a single group, to the system.
groupdel
To remove an existing group.
groupmod
To modify the information for an existing group.
Maintaining User Information using the Graphical User Interface (GUI)
Fedora, system-config-users.
RHEL, redhat-config-users.
openSuSE/SEL Linux, yast2 users.
Ubuntu, sudo users-admin.
Users and Access Permissions
The four types of permissions are read, write, execute, and none.
The three user types are owner, group, and everyone.
The chmod command is for altering file permission.
For example, chmod 777 filename, will give everyone, global access.
chmod 777 <file-name>
The stat command is similar to ls -la — gives file permission as octal
stat -c "%a %n" *
The passwd command is for changing password.
The id command will offer user information.
Reference
- Soyinka, A. (2009). Linux Administration: A Beginner’s Guide. McGraw-Hill.
Leave a comment