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


Click here to return to the 'Regain lost space hidden in trash on external disks' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Regain lost space hidden in trash on external disks
Authored by: lithoman on Jul 03, '08 09:07:43AM

replace exit with sudo -k
otherwise any command someone types prefaced with sudo will execute as root without asking for a password. This happens even if you close the terminal window and make a new one.



[ Reply to This | # ]
Regain lost space hidden in trash on external disks
Authored by: djdawson on Jul 03, '08 09:44:15AM

You can also edit your /etc/sudoers file and add this line to turn off the sudo grace period:

Defaults:ALL timestamp_timeout=0

You'll need to use the "sudo visudo" command to do this. There are a few other things you can do to tighten down the sudo command, such as enabling logging and restricting which users can use it, so interested users may find it useful to also do a "man sudoers" and read about the various options.



[ Reply to This | # ]
Regain lost space hidden in trash on external disks
Authored by: corienti on Jul 03, '08 04:06:17PM

... for 5 minutes since you originally entered the password, until sudo forgets the password.

Or, alternately, you could just be not paranoid about someone maliciously running a sudo command on your computer within the next 5 minutes while you're distracted somehow, not noticing a stranger on your keyboard and in a terminal in time to prevent them carrying out their evil plan... :-)

(whereby they need root access to accomplish their nefarious activities, and for some reason simply deleting your documents isn't sufficiently evil)

sudo -k is worth pointing out, for sure - it's good for people to know about - but your post sounds unnecessarily alarmist, to me :-)



[ Reply to This | # ]