Su root switches to the user named root and doesn't simulate directly logging in Sudo su asks your password, becomes root momentarily to run su as root So in this case you are running su using sudo and you don't have to know root's actual password Assuming you're actually running the script as root, however, you can use sudo Su is primarily for switching users, while sudo is for executing commands as other users. I am having problems with the su command
I know my password and i am typing it correctly, but su indicates authentication failure So i checked on the internet and then went into recovery mode and 知乎话题广场,汇聚多样化主题,助您探索知识、分享见解。 To return to the normal user shell, insert the command exit. It lets you run a command as another user, provided you know that user's password When run with no user specified, su will default to the root account
Just add the user to the sudo group Sudo adduser <username> sudo the change will take effect the next time the user logs in # allow members of group sudo to execute any command %sudo all=(all:all) all as long as you have access to a user that.
OPEN