I've developed a bad habit of constantly sudoing to root. I was wondering if its possible to create an alias that prevents straight sudo but allows sudo -u. Or possibly echoes a warning when using sudo?
Asked
Active
Viewed 128 times
1
-
Why not just fix your bad habits? – John Gardeniers Nov 27 '12 at 06:14
1 Answers
4
This is a people problem, but...
By default sudo gives a warning when asking for your password ("with great power comes great responsibility etc etc")
You can use a custom sudo lecture file to setup a custom warning.
In /etc/sudoers
Defaults lecture_file=/home/user/lecture lecture=always

Sirex
- 5,499
- 2
- 33
- 54