I have an SH file
sudo -i
run command here
Once I have run the command, I want to remove the root privileges...
So... how do I "undo" the sudo command, so speak?
I have an SH file
sudo -i
run command here
Once I have run the command, I want to remove the root privileges...
So... how do I "undo" the sudo command, so speak?
Last edited by KingNeil; March 8th, 2013 at 08:35 PM.
So for me, it would beCode:su user_name
Code:su cortman
revokes the user's cached credentials - see the man page for detailsCode:sudo -k
Code:man sudo
Forum DOs and DON'Ts
Please use CODE tags
Including your email address in a post is not recommended
My Blog
lisati.... that is exactly what I was looking for
Thank you. However, I do have another issue... (see next post)exit
Last edited by KingNeil; March 8th, 2013 at 08:36 PM.
The issue is... I'm trying to do the following, in an SH file...
And, it doesnt seem to work...Code:sudo -i command that requires sudo exit command that doesn't require sudo
How would I go in and out of a sudo privileges within an SH file??
Last edited by KingNeil; March 8th, 2013 at 08:37 PM.
Bookmarks