首页 > 代码库 > sudo and su

sudo and su

sudo bash : change the current user into root

su u1: change the current user into u1

useradd: add new user into system

userdel: delete a user from system

groups: check a user‘s group information

chown: chang a file‘s owner

chmod: chang a file‘s mod

gpasswd -a u3 foo: add user into a group

su u1 -c "./objput doc<testfile"

 

sudo and su