[PATCH] Re: Question about adduser in Busybox
Göran Hillebrink
goran.hillebrink at transmode.com
Sat Jan 9 18:46:13 UTC 2010
Hi,
Thanks, but it doesn't work for me. Now after the patch the user is added to the root group after the command below:
adduser -H -G webuser goran
The group file after this looks like this:
root::0:root,admin,goran
admin::100:admin
webuser::200:admin,user,guest
user::500:user
guest::501:guest
/Goran
From: Tito <farmatito at tiscali.it>
To: busybox at busybox.net
Cc: Göran Hillebrink <goran.hillebrink at transmode.com>
Date: 2010-01-09 15:37
Subject: [PATCH] Re: Question about adduser in Busybox
On Saturday 09 January 2010 13:48:15 Göran Hillebrink wrote:
>
> Hi,
>
> I'm using Busybox 1.15.2 for this.
>
> When I add a new user I also want this user to be added to an existing group. But the new user is not added to any group for me.
>
> The command I run is this:
>
> adduser -H -G webuser goran
>
> Before the passwd file looks like this:
>
> root:$1$M70LUXMe$n5q8yrW8prPNSPl4OLuva.:0:0:root:/root:/bin/sh
> admin:j/Ac.Nk3iRt6Y:100:100:Administrator:/usr:/bin/sh
> user:F/80wrbCLq4SE:500:500:User:/usr:/bin/sh
> guest:xOhVahdfOQYjY:501:501:Guest:/usr:/bin/sh
>
> Before the group file looks like this:
>
> root::0:root,admin
> admin::100:admin
> webuser::200:admin,user,guest
> user::500:user
> guest::501:guest
>
> After i run the command above to add a new user and also add to the group webuser the passwd file looks like this:
>
> root:$1$M70LUXMe$n5q8yrW8prPNSPl4OLuva.:0:0:root:/root:/bin/sh
> admin:j/Ac.Nk3iRt6Y:100:100:Administrator:/usr:/bin/sh
> user:F/80wrbCLq4SE:500:500:User:/usr:/bin/sh
> guest:xOhVahdfOQYjY:501:501:Guest:/usr:/bin/sh
> goran:$1$EVPQ4B9W$NmBcFbFl.7x8PJfgCoQFo1:1000:200:Linux User,,,:/home/goran:/bin/sh
>
> After i run the command above to add a new user and also add to the group webuser the group file looks like this:
>
> root::0:root,admin
> admin::100:admin
> webuser::200:admin,user,guest
> user::500:user
> guest::501:guest
>
>
> The user is added but not added to any group. Is this a error with Busybox adduser or? I know I don't have a user webuser. Can this cause this problem?
> I run a strace on adduser and don't see adduser use the webuser anywhere.
>
> Regards,
> Goran
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
>
Hi,
can you please test if the attached patch fixes it for you.
--- loginutils/adduser_orig.c 2010-01-09 15:33:52.000000000 +0100
+++ loginutils/adduser.c 2010-01-09 15:33:17.000000000 +0100
@@ -190,7 +190,7 @@
/* add to group */
/* addgroup should be responsible for dealing w/ gshadow */
/* if using a pre-existing group, don't create one */
- if (!usegroup)
+ if (usegroup)
addgroup_wrapper(&pw);
/* clear the umask for this process so it doesn't
Ciao,
Tito
[attachment "adduser.patch" deleted by Göran Hillebrink/Transmode]
More information about the busybox
mailing list