New makefile nitpick

George Boudreau georgeb at
Fri Sep 15 14:15:51 PDT 2006

George Boudreau wrote:
> wrote:
>> 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
>> 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
>> 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 PAT
>   no.. and after deleting the lfs/hls/clfs accounts I have the same 
> problem when trying to build from my account.
>   I will fix this and get back to you.
>   G.
   Rather than have the user play with the sudoers file I will add this 
line to the generated Makefile.

export PATH := ${PATH}:/usr/sbin

   If the user already has /usr/sbin in his/her PATH then this will be 
redundant. YES, I could check for and not add the additional path if it 
already existed but this is a cheap and dirty fix.

More information about the alfs-discuss mailing list