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

Kevin B. McCarty kmccarty at Princeton.EDU
Thu Nov 17 14:40:20 UTC 2005


reassign 150186 passwd 1:4.0.3-31sarge5
thanks

Marc Haber wrote:
> 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.

Thank you, with the --debug flag I've been able to find the problem.

adduser at some point calls "/usr/bin/passwd <newuser>" and it is that
which messes up the NIS line in /etc/passwd.  I have no idea why it is
changing anything in /etc/passwd other than the line for the requested
user.  The useradd and chfn programs, on the other hand, seem blameless.

Demonstration (after already adding a test user "foo"):

maia[28]:~# tail -n 3 /etc/passwd
privoxy:x:103:65534::/etc/privoxy:/bin/false
foo:x:1501:100:,,,:/home/foo:/bin/false
+::::::
maia[29]:~# /usr/bin/passwd foo
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
maia[30]:~# tail -n 3 /etc/passwd
privoxy:x:103:65534::/etc/privoxy:/bin/false
foo:x:1501:100:,,,:/home/foo:/bin/false
+::0:0:::

Reassigning to passwd (the version in Sarge) as you requested.

regards,

-- 
Kevin B. McCarty <kmccarty at princeton.edu>   Physics Department
WWW: http://www.princeton.edu/~kmccarty/    Princeton University
GPG: public key ID 4F83C751                 Princeton, NJ 08544




More information about the Adduser-devel mailing list