fixing /etc/passwd

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


Thanks for the suggestions but these two are not the problem. I don't have
problem with the $ since I got other machines in it just fine and can remove
and mod them fine via command. The problem is that I hand edited and something
seems to be left over in "memory" which makes it think the machine is still
there.

I tried putting in sa$:::::: in the file but it didn't react favorably to
this. Problem persists.

I wonder if a reboot will take care of it but I feel hesitent to reboot and it
wouldn't make sense./

There has got to be a nice way to do this.

Another question. I got win xp pro hooked up to samba 2.2.2 and it works all
well. It mounts shares but it errors on each sayinhg:

(drive letter):\ is a location that is unavailable. Please check the
connection of the harddrive or if the network share has moved. I know its not
a samba problem since I didnt change the server since win2k. I figure win xp
has some permission setting preventing to mount shares. I couldn't find any
thing online to this problem.

mk

> > I have two suggestions:
> > (1) Try editing /etc/passwd and /etc/group by hand with your favorite text
> editor.
>
> (2) You may need to escape the "$" on the shell prompt with "\$" like:
> useradd -g machines -c NTMachine -d /dev/null -s /bin/false sa\$
>
> -Ben
>
> > -----Original Message-----
> > From: linux-user-admin@egr.msu.edu
> > [mailto:linux-user-admin@egr.msu.edu]On Behalf Of Marcel Kunath
> > Sent: Tuesday, December 25, 2001 1:21 AM
> > To: linux-user@egr.msu.edu
> > Subject: fixing /etc/passwd
> >
> >
> > 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
>
> _______________________________________________
> linux-user mailing list
> linux-user@egr.msu.edu
> http://www.egr.msu.edu/mailman/listinfo/linux-user
>