sudo moron

der.hans PLUGd at LuftHans.com
Fri Sep 9 11:57:14 MST 2005


Am 09. Sep, 2005 schwätzte Craig White so:

A quick glance makes me think the commands don't match up.

> gonna show my ignorance when it comes to sudo
>
> # tail -n 8 /etc/sudoers
> # Cmnd alias specification
> Cmnd_Alias IPOD=/sbin/modprobe sbp2

/sbin/modprobe -r sbp2

I think you need to specify the -r the Cmnd_Alias.

> sbp2_force_inquiry_hack=1, /sbin/rmmod sbp2

Is that setting an environmental variable? I've never tried to do that in
the middle of a Cmnd_Alias definition.

> Cmnd_Alias EJECT=/usr/bin/eject

/usr/bin/eject /dev/sda2

I think you need to specify /dev/sda2 for the Cmnd_Alias.

> # User privilege specification
> craig   ALL=(ALL) ALL
> craig   ALL= NOPASSWD : IPOD
> craig   ALL= NOPASSWD : EJECT

You can put that all on one $line.

# lufthans ALL=(ALL) /usr/bin/apt-get update, /usr/bin/apt-get install *, \
# 	NOPASSWD: /bin/tar x --atime-preserve -pvf -

Here's a setup I used to use.

ciao,

der.hans

> $ cat gtkpod.out
> #!/bin/sh
> #
> sudo /usr/bin/eject /dev/sda2
> sudo /sbin/modprobe -r sbp2
> sudo /usr/bin/eject /dev/sda2
>
> I am trying to get the ipod unmounted automatically at close of gtkpod.
> If I launch gtkpod (as user) via cli, I am asked for password when I the
> gtkpod.out program.
>
> How can I get it to stop asking for my password?
>
> Craig
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change  you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>

-- 
#  https://www.LuftHans.com/
#  A t-shirt a day keeps the noose away. - der.hans


More information about the PLUG-discuss mailing list