You are not logged in.
I thought it would be interesting to see what other people stick in there.
root ALL=(ALL) ALL
peasantoid ALL=(ALL) ALL
peasantoid ALL=NOPASSWD: /usr/sbin/pm-suspend
peasantoid ALL=NOPASSWD: /usr/sbin/iwconfig
peasantoid ALL=NOPASSWD: SETENV: /usr/bin/vlock # for locking screen, e.g. `sudo USER=peasantoid vlock -n`
Offline
You actually thought this would be interesting?
Mine is pretty much standard.
Offline
You actually thought this would be interesting?
That is what I said, no?
I just wanted to see what kind of sudo hackery people had done, that's all.
Offline
My sudo is standard, only thing I do is visudo, go to the line where it lets all users in wheel use sudo.. and uncomment it. Bang.
Offline
Same.
urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand
Offline
Mhm... it's become clear to me that this is one hell of a boring thread.
Offline
Yeah, most of mine is the same as the previous posts. I have added shutdown and reboot, and the shutdown helper for xfce4. I have also added a NOPASSWD entry for netcfg, which is handy when moving around a bit.
# User privilege specification
root ALL=(ALL) ALL
vW ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
%wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
vW ALL=(root) NOPASSWD: /usr/lib/xfce4/xfsm-shutdown-helper
# %users localhost=NOPASSWD:/usr/lib/xfce4/xfsm-shutdown-helper
# http://wiki.archlinux.org/index.php/Allow_users_to_shutdown
vW localhost = NOPASSWD: /sbin/shutdown -h now
vW localhost = NOPASSWD: /sbin/reboot
# allow me to control wireless
vW localhost = NOPASSWD: /usr/bin/netcfg2
Offline
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
Defaults env_keep += "XDG_SESSION_COOKIE"
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# Runas alias specification
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
%wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
%wheel ALL= (ALL) NOPASSWD: /etc/rc.d/mpd restart
%wheel ALL= (ALL) NOPASSWD: /etc/rc.d/mpdscribble restart
%wheel ALL= (ALL) NOPASSWD: /usr/sbin/iwlist wlan0 scan
%wheel ALL= (ALL) NOPASSWD: /sbin/shutdown -hP now
%wheel ALL= (ALL) NOPASSWD: /etc/rc.d/hal start
%wheel ALL= (ALL) NOPASSWD: /sbin/reboot
%wheel ALL= (ALL) NOPASSWD: /bin/sync
%wheel ALL= (ALL) NOPASSWD: /usr/bin/netcfg2
%wheel ALL= (ALL) NOPASSWD: /usr/bin/beep
%wheel ALL= (ALL) NOPASSWD: /usr/bin/wifi-select
Offline
suspend without password
Offline
eb blackout=/usr/bin/pacman,/usr/bin/abs,/etc/rc.d/*,/usr/bin/vim /etc/*,/usr/bin/aurbuild,/usr/bin/vim /boot/grub/menu.lst
eb blackout=NOPASSWD:/sbin/shutdown,/sbin/reboot
Last edited by bangkok_manouel (2009-05-22 17:50:50)
Offline
Defaults insults, logfile=/var/log/sudo
root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
%users localhost=NOPASSWD: /sbin/halt
%users localhost=NOPASSWD: /sbin/reboot
%wheel localhost=NOPASSWD: /etc/rc.d/net-profiles restart
%users ALL=NOPASSWD: /usr/bin/pacman
%users ALL=NOPASSWD: /usr/bin/pacdiffviewer
Well, halt and reboot are there to be able to shut down the computer quickly.
(like in a menu entry of my WM)
net-profiles because it's easy to have problems with Wi-Fi ...
pacmam and pacdiffviewer for yaourt.
Defaults insults, logfile=/var/log/sudo
This will give you less boring messages
$ sudo su -
Password:
I have been called worse.
And I kinda like having every command run with sudo in a separate file. (makes it easier for forensics)
Last edited by Yannick_LM (2009-05-22 20:09:17)
Offline
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Defaults specification
Defaults always_set_home
Defaults editor = /usr/bin/vim:/usr/bin/vi:/usr/bin/nano
Defaults lecture = once
Defaults passwd_timeout = 1
Defaults targetpw
Defaults timestamp_timeout = 5
Defaults tty_tickets
Defaults !fqdn
# Host alias specification
# User alias specification
# Cmnd alias specification
Cmnd_Alias CRYPT = /sbin/cryptsetup luksOpen *, /sbin/cryptsetup luksClose *
# Runas alias specification
# User privilege specification
root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
%storage ALL=NOPASSWD: CRYPT
Offline
Some power settings, full privileges for wireless tasks and otherwise I use sudo as one would with ubuntu, only it uses the root password to authorise. More convenient for me as I often tend to forget to log out of root terminals and just as secure.
# sudoers file.
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
Defaults rootpw, insults
# Runas alias specification
# User privilege specification
root ALL=(ALL) ALL
MYNORMALUSER ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
MYNORMALUSER ALL = (ALL) NOPASSWD: /usr/sbin/pm-hibernate
MYNORMALUSER ALL = (ALL) NOPASSWD: /usr/sbin/pm-suspend
### Netcfg ###
# User alias specification
User_Alias NETPROFILERS=MYNORMALUSER, guest
# Cmnd alias specification
Cmnd_Alias NETPROFILES=/sbin/ifconfig,/usr/bin/iwconfig,/usr/sbin/iwlist,/usr/bin/netcfg2,/bin/hostname,/usr/sbin/lspci
# User privilege specification
NETPROFILERS ALL=NOPASSWD: NETPROFILES
MYNORMALUSER ALL = (ALL) NOPASSWD: /home/MYNORMALUSER/skiftlinie.sh
### Admin tasks for user ###
# User privilege specification
root ALL=(ALL) ALL
ADMINS ALL = SUPER
Offline
Offline
I going to ask it here, as it's no use starting a new thread:
How (and can) I set specific time it takes to "turn sudo off"? You know that it re-ask you for your password after let say 30mins? I think it is possible but I don't find this in Wiki.
Anyway my Sudo is just allowing me and root....
Arch x86_64 ATI AMD APU KDE frameworks 5
---------------------------------
Whatever I do, I always end up with something horribly mis-configured.
Offline
Should be the option called "timestamp_timeout".
Defaults timestamp_timeout = ... # some number
Offline
# Defaults specification Defaults always_set_home Defaults lecture = once Defaults tty_tickets Defaults !fqdn
can you explain me this entry defaults? Thanks...
Last edited by ugaciaka (2009-05-23 17:49:04)
I have never bought on ebay, the macbook I do not like, I do not need facebook or myspace or secondlife
I am not a nerd or lamer or troll or geek or hacker or cracker
and I have never voted to elect berlusconi
Offline
Should be the option called "timestamp_timeout".
Defaults timestamp_timeout = ... # some number
Thanks hope it works!
Arch x86_64 ATI AMD APU KDE frameworks 5
---------------------------------
Whatever I do, I always end up with something horribly mis-configured.
Offline
rscholer wrote:...
can you explain me this entry defaults? Thanks...
always_set_home
If set, sudo will set the HOME environment variable to the home directory of the target user (which is root unless the -u option is used). This effectively means that the -H option is
always implied. This flag is off by default.lecture
This option controls when a short lecture will be printed along with the password prompt. It has the following possible values:
always Always lecture the user.
never Never lecture the user.
once Only lecture the user the first time they run sudo.
If no value is specified, a value of once is implied. Negating the option results in a value of never being used. The default value is once.tty_tickets
If set, users must authenticate on a per-tty basis. Normally, sudo uses a directory in the ticket dir with the same name as the user running it. With this flag enabled, sudo will use a file named for the tty the user is logged in on in that directory. This flag is off by default.fqdn
Set this flag if you want to put fully qualified hostnames in the sudoers file. I.e., instead of myhost you would use myhost.mydomain.edu. You may still use the short form if you wish (and even mix the two). Beware that turning on fqdn requires sudo to make DNS lookups which may make sudo unusable if DNS stops working (for example if the machine is not plugged into the network). Also note that you must use the host's official name as DNS knows it.
That is, you may not use a host alias (CNAME entry) due to performance issues and the fact that there is no way to get all aliases from DNS. If your machine's hostname (as returned by the hostname command) is already fully qualified you shouldn't need to set fqdn. This flag
is off by default.
Offline
mike ALL=(ALL) NOPASSWD: /usr/bin/truecrypt
mike ALL=(ALL) NOPASSWD: /bin/ntfs-3g
mike ALL=/usr/bin/pacman
Offline
most important:
Defaults insults
☃ Snowman ☃
Offline
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
Cmnd_Alias SHUTDOWN_CMDS = /sbin/shutdown, /sbin/reboot
Cmnd_Alias NETWORK_TOOLS = /usr/sbin/pppoe-start, /usr/sbin/pppoe-stop
# Defaults specification
Defaults insults
# Runas alias specification
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
%wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
# Commands without a password
%wheel ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS
%wheel ALL=(ALL) NOPASSWD: NETWORK_TOOLS
Offline