Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I did some authentication mounting where I added code like timestamp_timeout on sudoer.

This setting will effect every mounting, where you must enter the user password. After entering the password correctly, an indicator is shown, with an option to "Drop all elevated privileges".

How do I drop elevated privileges using the terminal (CLI)?

share|improve this question
    
Favorited because I'm curious now. Searching didn't turn up anything. –  zookalicious May 3 '11 at 4:42
    
I don't think it is possible. If you don't want to keep the elevated privileges at all, change the polkit settings from auth_admin_keep to auth_admin. –  arrange May 3 '11 at 9:33
    
Related StackExchange question regarding sudo su: superuser.com/questions/583784/… –  Christopher Kyle Horton Jun 19 at 16:44

2 Answers 2

I'm not quite sure I understood your question right. Could you clarify whether you have access to the console that granted the right to mount?

sudo privileges can be revoked with -k and -K switches.

Quoting man sudo:

-K The -K (sure kill) option is like -k except that it removes the user's timestamp entirely and may not be used in conjunction with a command or other option. This option does not require a password.

-k When used by itself, the -k (kill) option to sudo invalidates the user's timestamp by setting the time on it to the Epoch. The next time sudo is run a password will be required. This option does not require a password and was added to allow a user to revoke sudo permissions from a .logout file.

This won't work with gksudo.

share|improve this answer
exec su -l dmendeleev

Where dmendeleev is the username that you what to drop to.

This will replace the current process with a new shell and set the process uid, gid, euid, and egid to non-root.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.