Skip to main content

Posts

Showing posts from December, 2019

Password commands in Ubuntu

/etc/passwd file  In Ubuntu each user is assigned to user id and password. You can find out details of users in the file /etc/passwd. So let us display its content cat /etc/passwd This file stores user names, their uids, their home directories. Historically this file used to save encrypted password. Now it does not - just an x to indicate whether user has a password. Now you are relieved. Now you know that your passwords are not visible in this file. (In fact /etc/shadow stores passwords in encrypted form) Protecting your files Can we prevent other users from seeing your files? Of course. You know that there are 3 sets of permissions for each file and directory. If we remove read(and write) permission of a directory for "others" then other users can not open that directory. So you remove read permission to your home directory by others.  chmod o-rwx /home/yourusername This command removes read write and execute permissions to others for your home dire