Ordinary linux users get root user rights

Create user, set password

useradd test

passwd test

Join user group-G is for additional user group

usermod -G root test

newgrp root

 

View current user group

gropus [user]

 

Modify file

vim /etc/sudoers

test ALL = (ALL) ALL

 

chmod -R current directory and subdirectories

7 Read + write + execute rwx 111
6 Read + write rw- 110
5 Read + execute r-x 101
4 Read only r-- 100
3 Write + execute -wx 011
2 just write -w- 010
1 Execute only --x 001
0 no

Guess you like

Origin blog.csdn.net/csd_nuser/article/details/112955708