Users and Groups - noyage/redhat GitHub Wiki
-
$ cat /etc/passwd
note this is a world-readable file- the format of the passwd file is based on the GECOS format
- username : x : UID : GID : comment : home directory : shell
-
$ cat /etc/shadow
only accessible to theroot
user
- make group first
-
# groupadd (groupname)
<-- takes next available GID -
# groupadd -g GID (groupname)
<-- to specify GID number *# useradd -c "comment field" -d /home/username -s /bin/bash -u UID -g GID -m username
-
$ cat /etc/shells
# usedel (username)
- old school way (risky):
# vipw
- change shell
$ usermod --shell /bin/bash (username)
$ chsh --shell /bin/ksh (username)
-
user1:x:1000:1000:RegularUser:/home/user1:/bin/bash
-
username : encrypted password : uid : gid : GECOS : home directory : type of shell
-
user passwords are encrypted
-
user : encrypted password : lastchg days : min days : max days : warn days : inactive days: disabled days : not used
- Provides an added layer of protection on the group level. Group passwords can be encrypted and stored in /etc/gshadow
- only readable as root * user1 : encrypted password : groupadmins : members