x2oica
Last Updated: March 03, 2016
·
1.138K
· zedtux
609b69cbb09257883a4e32d7d5aff098

sudo: Drop root privileges

sudo is a very useful command that will execute a given command as root without opening a root session.

Depending on your configuration you will be able to execute other commands as root -- still using sudo -- without entering the root password.

So let's say you just finished with the sudo command on the machine and have to leave, you don't want to let the other user be able to do sudo commands. (Like sudo passwrd :))

To close the "opened session" use the following:

sudo -k
Say Thanks
Respond

3 Responses
Add your response

4561
D42a7264714dee5006b9c99d2567a320

I knew there must be such method but never wondered, thanks! :)

Of course it's always best to just lock your computer when going AFK if you're concerned about your co-workers ;)

over 1 year ago ·
4568
E7c183e3efddc27e1bfc07802626548b

@Guillaume: don't you have nice co-workers??? :)

over 1 year ago ·
4577
609b69cbb09257883a4e32d7d5aff098

@polysign: Yes I have, but could happen that one of them wants to do a joke... :-D

over 1 year ago ·