SCO Unix /etc/passwd question
Rick Stout
rick at crash.cts.com
Sun Jul 29 05:13:09 AEST 1990
In article <90204.194456UH2 at psuvm.psu.edu> UH2 at psuvm.psu.edu (Lee Sailer) writes:
>There is this big warning in the manuals---do not edit /etc/passwd
>with a text editor!!!!---which I have just ignored. Am I in for
>trouble.
>
>The problem: Several early users had accounts created with home directories
>in /usr. But I wanted them in the newly created /u. Sysadmsh doesn't
>seem to have a "move user's HOME directory" command. So, like in the
>"old days" 8-) I edited /etc/passwd to indicate /u/userid for each
>home directory, and used tar to move everyone's files.
>
>So far, it seems to have worked. But that warning has me a little
>nervous.
>
>So. Am I in trouble, or what?
>
You should be OK. I had set up users and then had to restore
the whole system from tape. In the process somehow I lost the
user accounts in the /etc/passwd file. (maybe the restore
won't overwrite the protected password database).
I couldn't add the users then because the subsystem said that
user name had been used before, and once an account is retired,
it is supposedly gone for good.
I figured I had nothing to lose so I edited the /etc/passwd file
to add all the user names I had fore. I did make sure I gave
them the same uid numbers, but I don't know if it would matter.
I think you could just chown the files to the new user name.
It worked fine. I did have to go into the sysadmsh and manually
re-establish the authorizations for the users.
Make sure you have an OVERIDE tty defined and I would also have
a copy of the passwd file.
Rick
________________________________________________________________________________
Rick Stout ...uunet!eysd!rick
Ernst & Young, San Diego (619) 236-1100
================================================================================
More information about the Comp.unix.i386
mailing list