New makefile nitpick

M.Canales.es manuel at linuxfromscratch.org
Fri Sep 15 13:22:21 PDT 2006


El Viernes, 15 de Septiembre de 2006 22:04, George Boudreau escribió:
>
> This 'should' do the trick
> <YOURUSERNAME>   ALL = /usr/sbin/useradd, /usr/sbi/groupadd
>
> http://www.gratisoft.us/sudo/man/sudoers.html

Don't work. I have this line:

<MyUser>  ALL=(ALL) NOPASSWD: ALL,/usr/sbin/useradd,/usr/sbin/groupadd

but

macana at sandbox:~$ sudo useradd
sudo: useradd: command not found

This other works

macana at sandbox:~$ PATH=$PATH:/usr/sbin sudo useradd
Usage: useradd [-u uid [-o]] [-g group] [-G group,...]
               [-d home] [-s shell] [-c comment] [-m [-k template]]
               [-f inactive] [-e expire]
       useradd -D [-g group] [-b base] [-s shell]
               [-f inactive] [-e expire]

no matter if I have the above line or simply

<MyUser>  ALL=(ALL) NOPASSWD: ALL

I can't find a way to force sudo to use the root PATH except via "sudo -i", 
but that don't will work into a script, IMHO.

Do you have /sbin and /usr/sbin in you builder user PATH?

-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfromscratch.org
LFS en castellano: http://www.escomposlinux.org/lfs-es http://www.lfs-es.info
TLDP-ES:                           http://es.tldp.org



More information about the alfs-discuss mailing list