This content originally appeared on DEV Community and was authored by Mahbub Ferdous Bijoy
- use sudo command to see some confidential or root user access file:
$ cat /var/etc/shadow [you cant see access denied]
$ sudo cat /var/etc/shadow [noew you can see]
$ sudo cat /var/etc/passwd
$ sudo cat /var/etc/group
- add some user by using useradd command:
$ sudo useradd userName
- delete some user by using userdel command:
$ sudo userdel userName
- cahnging some user password :
$ sudo passwd userName
- if we want to know our ssh key :
$ cat ~/.ssh/id_rsa.pub
- connect your machine with remote machine via ssh :
$ ssh -i "key-pair_fileName_PATH ubuntu@ip_address [ubuntu or any os]
- something copy from remote server:
$ scp -i <keypair_PATH> < keypair_PATH> <user@ip_address>: filePath
here all linux permission command:
- check file permission:
$ ls -l
- to change any file permission by using chmod(rwx):
$ chmod +x fileName [make executable file]
$ chmod +rwx fileName [ make permission read,write, executable]
$ chmod -rwx fileName [ remove all permission]
$ chmod -x fileName [remove executable permission]
- we can give permission by using numaric command like 777:
Description: for read - 4, write - 2, execute -1. all together 7. for 777 means 1st 7 for user, 2nd for group and 3rd for all user
$ chmod 777 fileName [all permission for user,group and all]
$ chmod 742 fileName [all permission for user, read for group, write for all]
$ chmod 124 fileName [execute permission for user, write for group, read for all]
$ chmod 711 fileName [ all permission for user, execute for groups and all]
- modifying ownership permission :
$ sudo chown userName fileName [it will change files user ownership]
$ sudo chgrp groupName fileName [it will change files group ownership]
$ sudo chmod userName:groupName fileName [it will change both user & group ownership]
- if you want to change your user password:
$ passwd
- to see our system name :
$ uname
- to see our system name and details:
$ uname -a
$ uname -r [to check only version numaric ]
- add a user to a group :
$ sudo usermod -a -g groupName userName
- remove a user from a group:
$ sudo deluser userName groupName
- Shows information of all the users logged in:
$ finger
- show information of a particular user:
$ finger userName
This content originally appeared on DEV Community and was authored by Mahbub Ferdous Bijoy
Print
Share
Comment
Cite
Upload
Translate
Updates
There are no updates yet.
Click the Upload button above to add an update.

APA
MLA
Mahbub Ferdous Bijoy | Sciencx (2024-09-30T16:48:59+00:00) Day-3: Linux user management and permissions. Retrieved from https://www.scien.cx/2024/09/30/day-3-linux-user-management-and-permissions/
" » Day-3: Linux user management and permissions." Mahbub Ferdous Bijoy | Sciencx - Monday September 30, 2024, https://www.scien.cx/2024/09/30/day-3-linux-user-management-and-permissions/
HARVARDMahbub Ferdous Bijoy | Sciencx Monday September 30, 2024 » Day-3: Linux user management and permissions., viewed ,<https://www.scien.cx/2024/09/30/day-3-linux-user-management-and-permissions/>
VANCOUVERMahbub Ferdous Bijoy | Sciencx - » Day-3: Linux user management and permissions. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/09/30/day-3-linux-user-management-and-permissions/
CHICAGO" » Day-3: Linux user management and permissions." Mahbub Ferdous Bijoy | Sciencx - Accessed . https://www.scien.cx/2024/09/30/day-3-linux-user-management-and-permissions/
IEEE" » Day-3: Linux user management and permissions." Mahbub Ferdous Bijoy | Sciencx [Online]. Available: https://www.scien.cx/2024/09/30/day-3-linux-user-management-and-permissions/. [Accessed: ]
rf:citation » Day-3: Linux user management and permissions | Mahbub Ferdous Bijoy | Sciencx | https://www.scien.cx/2024/09/30/day-3-linux-user-management-and-permissions/ |
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.