|
List Info
Thread: New makefile nitpick
|
|
| New makefile nitpick |

|
2006-09-15 19:21:21 |
First try doing a build failed with:
Building target 021-addinguser
/bin/sh: groupadd: command not found
/bin/sh: useradd: command not found
make[2]: *** [021-addinguser] Error 127
make[2]: Leaving directory `/mnt/build_dir/jhalfs'
make[1]: *** [mk_SETUP] Error 2
make[1]: Leaving directory `/mnt/build_dir/jhalfs'
I think that that is due my builder user not having /sbin
and /usr/sbin in
their path.
How can that be fixed via /etc/sudoers? I think that is
something related
with the "path_info" flag, but I don't know
well yet the sudoers sintax.
--
Manuel Canales Esparcia
Usuario de LFS nº2886: http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.info
TLDP-ES: http://es.tldp.org
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
|
|
| New makefile nitpick |

|
2006-09-15 20:04:34 |
M.Canales.es wrote:
> First try doing a build failed with:
>
> Building target 021-addinguser
> /bin/sh: groupadd: command not found
> /bin/sh: useradd: command not found
> make[2]: *** [021-addinguser] Error 127
> make[2]: Leaving directory `/mnt/build_dir/jhalfs'
> make[1]: *** [mk_SETUP] Error 2
> make[1]: Leaving directory `/mnt/build_dir/jhalfs'
>
> I think that that is due my builder user not having
/sbin and /usr/sbin in
> their path.
>
> How can that be fixed via /etc/sudoers? I think that
is something related
> with the "path_info" flag, but I don't
know well yet the sudoers sintax.
>
This 'should' do the trick
<YOURUSERNAME> ALL = /usr/sbin/useradd,
/usr/sbi/groupadd
http://
www.gratisoft.us/sudo/man/sudoers.html
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
|
|
| New makefile nitpick |

|
2006-09-15 20:22:21 |
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 sandbox:~$ sudo useradd
sudo: useradd: command not found
This other works
macana 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.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.info
TLDP-ES: http://es.tldp.org
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
|
|
| New makefile nitpick |

|
2006-09-15 20:37:50 |
M.Canales.es 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
>>
>> 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 sandbox:~$ sudo useradd
> sudo: useradd: command not found
>
> This other works
>
> macana 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 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.
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
|
|
| New makefile nitpick |

|
2006-09-15 21:15:51 |
George Boudreau wrote:
> M.Canales.es 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
>>>
>>> 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 sandbox:~$ sudo useradd
>> sudo: useradd: command not found
>>
>> This other works
>>
>> macana 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
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 := $:/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.
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
|
|
| New makefile nitpick |

|
2006-09-15 21:30:22 |
On 9/15/06, George Boudreau <georgeb linuxfromscratch.org> wrote:
> >
> Rather than have the user play with the sudoers file
I will add this
> line to the generated Makefile.
>
> export 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.
First, I like it better to just put the needed paths in the
Makefile
than to silently expect them to be there. Here's an
alternative that
bombs if /sbin or /usr/sbin aren't in the path. Then the
user can put
it where they want.
$ cat Makefile
all: checkpaths
ls
checkpaths:
ifeq (,$(findstring /sbin,$(subst :, ,$(PATH))))
$(error You must have /sbin in your PATH!)
endif
ifeq (,$(findstring /usr/sbin,$(subst :, ,$(PATH))))
$(error You must have /usr/sbin in your PATH!)
endif
$ make
Makefile:6: *** You must have /sbin in your PATH!. Stop.
$ PATH=/sbin:$PATH
$ make
Makefile:9: *** You must have /usr/sbin in your PATH!.
Stop.
$ PATH=/usr/sbin:$PATH
$ make
ls
afind dummy.s Makefile
test.sh
arg filelist newer
time-check.sh
backup1.snar foo.sh progress
timestamp
backup1.tar gcc-glibc-corruption.txt prototype.sh
trace
dbnb glibc-build-desaster prototype.tar.bz2
ziptest
dummy.c glibc-desaster2 ps4.sh
dummy.i grub_glibc_error.txt scriptlets.tar.bz2
--
Dan
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
|
|
[1-6]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|