Bug#150186: [Adduser-devel] Bug#150186: adduser, deluser screw up /etc/passwd NIS "+::::::" entry

Marc Haber mh+debian-packages at zugschlus.de
Thu Nov 17 14:13:48 UTC 2005


On Thu, Nov 17, 2005 at 08:47:03AM -0500, Kevin B. McCarty wrote:
> maia[45]:~# adduser test2

Please retry with the --debug flag, so that we can see the exact
command lines passed to the low-level tools. Then please re-try
issueing these command lines manually and see whether the /etc/passwd
file gets mangled as well.

> Please let me know if you need further information (NIS config files,
> etc.) and I will be better about replying quickly.

I am sorry, I neither have time, nor resources to build a NIS test
bed, but I still don't think that adduser is a fault.

$ grep '/etc' /usr/sbin/adduser /usr/sbin/deluser /usr/share/perl5/Debian/AdduserCommon.pm
/usr/sbin/adduser:#      --conf FILE      use FILE instead of /etc/adduser.conf
/usr/sbin/adduser:$defaults = "/etc/adduser.conf";
/usr/sbin/adduser:$config{"skel"} = "/etc/skel";
/usr/sbin/deluser:#     --home <dir>            remove home only if /etc/passwd home dir
/usr/sbin/deluser:#     --conf | -c FILE  use FILE instead of /etc/deluser.conf
/usr/sbin/deluser:$defaults = "/etc/deluser.conf";
/usr/sbin/deluser:$config{"skel"} = "/etc/skel";
/usr/sbin/deluser:$config{"no_del_paths"} = "^/$ ^/lost+found/.* ^/media/.* ^/mnt/.* ^/etc/.* ^/bin/.* ^/boot/.* ^/dev/.* ^/lib/.* ^/proc/.* ^/root/.* ^/sbin/.* ^/tmp/.* ^/sys/.* ^/srv/.* ^/opt/.* ^/initrd/.* ^/usr/.* ^/var/.*";
/usr/sbin/deluser:read_config("/etc/adduser.conf");
/usr/sbin/deluser:    if(system("grep", "-q", "^.*:.*:.*:$gr_gid:.*:.*:.*\$", "/etc/passwd") == 0) {
/usr/sbin/deluser:  --home <dir>              remove home only if /etc/passwd home dir
/usr/share/perl5/Debian/AdduserCommon.pm:    if(-f "/etc/default/nis") {
/usr/share/perl5/Debian/AdduserCommon.pm:        $nisconfig = "/etc/default/nis";
/usr/share/perl5/Debian/AdduserCommon.pm:    } elsif(-f "/etc/init.d/nis") {
/usr/share/perl5/Debian/AdduserCommon.pm:        $nisconfig = "/etc/init.d/nis";

If I'm not mistaken, there is no code going to do write access on
/etc/passwd.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835




More information about the Adduser-devel mailing list