On Tuesday 17 February 2015 17:52:06 Laszlo Papp wrote:
> Hi,
> 
> 1) busybox addgroup user
> 2) busybox adduser -G user testuser1
> 3) busybox adduser -G user testuser2
> 4) busybox deluser testuser1
> 5) grep user /etc/passwd /etc/group
> 
> ...
> /etc/passwd:testuser2:x:1010:1007:Linux User,,,:/home/testuser2:/bin/bash
> ...
> /etc/group:user:x:1007:testuser,testuser2
>                                                    ^^^^^^
> ...
> 
> This is not how the desktop util behaves and I agree with the desktop
> util in this case. A non-existent user should not remain in
> /etc/group.
> 
> Do you agree or disagree?
> 
> Cheers, L.

Hi,
i agree that this case is not covered by actual bb's deluser code.
What we cover at the moment is:

deluser USER  (and group with same name if empty)
deluser USER from GROUP


The desktop util behaviour could be added tough.
By looking at the pseudo code you posted in a later
mail I wonder if it could be easier to change
deluser rather than update_passwd which is more complex.
Like:

        do_deluser
        get_user_group_list
        do_delgroup of primary group
        while_list
                do_deluser_from_group
or
        do_deluser
        while getgrent
                do_deluser_from_group(user, grname)
        do_delgroup of primary group

Ciao,
Tito
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to