Good day!
$ cat /etc/passwd
The /etc/passwd is a vital file to cat and stores essential information. For it contains login names of all users including super user accounts and their passwords. Today, with newer versions of UNIX or Unix-like releases they are tighting their security by moving the encrypted passwords from /etc/passwd to /etc/shadow making it only readable by root.
Here's how it look like when password shadowing is active:
$ cat /etc/passwd
This is a typical output of /etc/passwd file. The entries are separated by a ":", they are made be up to 7 fields in each line. The password field is substituted by "x".
root account, for example...
root:x:0:0:root:/root:/bin/bash
^ ^ ^^ ^ ^ ^
1 2 34 5 6 7
This is what each field represents..
1: the login name, root
2: the shadowed password
3: the user id, 0, root access
4: the group id, 0, root access
5: the users real name
6: the users home directory, /root
7: the shell that the user uses when he connects
If you see :*: in place of the encrypted password means that this account is locked, so no-one can login without root taking the lock off the account's password.
# cat /etc/shadow
The /etc/shadow file is only readable by root and it will look similar to this:
The first field contains users login, the second contains the encrypted password, the third contains a code of when the password was last changed, the fourth and fifth contains the minimum and maximum number of days for password changes.
$ cat /etc/group
The file has each group in the system. Each line will have 4 entries separated by a ":"
Example:
root:x:0:
It is illustrated like this:
Group name:password:group id:login names in the group
The id "0" is assigned to the root user.
-- FIN --
$ cat /etc/passwd
The /etc/passwd is a vital file to cat and stores essential information. For it contains login names of all users including super user accounts and their passwords. Today, with newer versions of UNIX or Unix-like releases they are tighting their security by moving the encrypted passwords from /etc/passwd to /etc/shadow making it only readable by root.
Here's how it look like when password shadowing is active:
$ cat /etc/passwd
This is a typical output of /etc/passwd file. The entries are separated by a ":", they are made be up to 7 fields in each line. The password field is substituted by "x".
root account, for example...
root:x:0:0:root:/root:/bin/bash
^ ^ ^^ ^ ^ ^
1 2 34 5 6 7
This is what each field represents..
1: the login name, root
2: the shadowed password
3: the user id, 0, root access
4: the group id, 0, root access
5: the users real name
6: the users home directory, /root
7: the shell that the user uses when he connects
If you see :*: in place of the encrypted password means that this account is locked, so no-one can login without root taking the lock off the account's password.
# cat /etc/shadow
The /etc/shadow file is only readable by root and it will look similar to this:
The first field contains users login, the second contains the encrypted password, the third contains a code of when the password was last changed, the fourth and fifth contains the minimum and maximum number of days for password changes.
$ cat /etc/group
The file has each group in the system. Each line will have 4 entries separated by a ":"
Example:
root:x:0:
It is illustrated like this:
Group name:password:group id:login names in the group
The id "0" is assigned to the root user.
-- FIN --
0 comments:
Post a Comment