Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


`sudo -k` | 22 comments | Create New Account
Click here to return to the '`sudo -k`' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
`sudo -k`
Authored by: lullabud on Jun 01, '05 01:06:55PM

Issuing <code>sudo -k</code> will expire the timeout rather than waiting for the grace period to actually time out. This is another solution that may work better for you, depending on your needs.



[ Reply to This | # ]
`sudo -k`
Authored by: maintain1 on Jun 01, '05 05:19:03PM

If you are using bourne shell then a file in your home directory called .logout with a line sudo -k in it will work.
.bash_logout is the name for the bash shell.
This will only work if the scripts use exit at the end of them.



[ Reply to This | # ]
`sudo -k`
Authored by: NovaScotian on Jun 02, '05 02:33:48PM
This hint is particularly useful from AppleScripts - i.e.

do shell script "sudo pmset spindown 0 dim 0" password myPW with administrator privileges
-- then your other stuff,  but ending with
do shell script "sudo -k"


[ Reply to This | # ]
`sudo -k`
Authored by: ringo999 on Sep 27, '05 09:46:04AM

isnt it a bit "stupid" to save your password in plain text in a script? this is what sudoers is for. I enabled my user i.e. the pmset command with the NOPASSWD feature.



[ Reply to This | # ]