Categories
Linux Tutorial Series

Linux Tutorial Series – 122 – A tidbit about users vol 4 – passwd and sudoers

Here is the video version, if you prefer it:

Have you ever wondered where information about regular users and superusers is kept? The answer is /etc/passwd and /etc/sudoers, respectively.

/etc/passwd maps users to their IDs. It also stores the home directory of the user. Encrypted user passwords are stored in /etc/shadow. (Ward, 2014)⁠ What does “encrypted” mean? It means that passwords are not stored as plain text – they are stored as some jibberish, but there are certain mechanisms which can figure out if a password you enter is valid by manipulating the aforementioned jibberish.

/etc/sudoers is the file containing users that can use the sudo command.

If you need any details on these files, I think that a Google search can do wonders. I just wanted to cover these files conceptually, so that you heard of them and know what they store.

Hope you learned something new!

References

Ward, B. (2014). How Linux Works: What Every Superuser Should Know (2nd ed.). No Starch Press. Pages 43; 153-157

Categories
Linux Tutorial Series

Linux Tutorial Series – 119 – A tidbit about users – passwd

Here is the video version, if you prefer it:

The passwd command can be used to change your (or other users) password. (“PASSWD(1),” n.d.)⁠ Just type in passwd as the command and the password change process will be initiated.

If you are the superuser, you can change the password of another user by typing his/her username:

passwd username

That way you can change other users passwords.

Hope you found this useful!

References

PASSWD(1). (n.d.). Retrieved February 28, 2020, from http://man7.org/linux/man-pages/man1/passwd.1.html