fixing /etc/passwd

Marcel Kunath kunathma@pilot.msu.edu
Tue, 25 Dec 2001 02:47:53 -0500 (EST)


Spoken too soon. I can add the lines to /etc/passwd and /etc/shadow and
/etc/samba/smbpasswd (by using proper command) but I cannot delete and
undelete the local machine account. It will delete it but it won't readd it
but still report user sa$ exists.

It is in working condition but I got to remember now tpo never touch tha
account again.

Sigh.

mk

>
> I think I fixed it. smbpasswd contained the old id of the machine. I added the

> line into /etc/passwd
>
> sa$:x:508:103:NTMachine:/dev/null:/bin/false
>
> and it works properly again. I guess I stay away from handedits for now. =)
>
> mk
>
> > >
> Hello, >
> > I mucked up my user setup in the passwd file.
> >
> > I added a machine for a PDC. I later deleted it and I must have done it the
> > wrong way. I now try to add it again and it fails.
> >
> > The name is
> >
> > sa$
> >
> > The files /etc/passwd and /etc/shadow don't have it referenced in it.
> >
> > I do a
> >
> > # useradd -g machines -c NTMachine -d /dev/null -s /bin/false sa$
> > useradd: user sa$ exists
> >
> > # usermod -g machines -c NTMachine -d /dev/null -s /bin/false sa$
> > usermod: sa$ not found in /etc/passwd
> >
> > # userdel sa$
> > userdel: error deleting password entry
> > userdel: error deleting shadow password entry
> >
> > # groups sa$
> > sa$ : machines
> >
> > How is this fixable?
> >
> > Thanks,
> >
> > mk
> > _______________________________________________
> > linux-user mailing list
> > linux-user@egr.msu.edu
> > http://www.egr.msu.edu/mailman/listinfo/linux-user
> >
>
>