Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!uunet!samsung!zaphod.mps.ohio-state.edu!usc!ucsd!helios.ee.lbl.gov!nosc!crash!rick From: rick@crash.cts.com (Rick Stout) Newsgroups: comp.unix.i386 Subject: Re: SCO Unix /etc/passwd question Message-ID: <3732@crash.cts.com> Date: 28 Jul 90 19:13:09 GMT References: <90204.194456UH2@psuvm.psu.edu> Organization: Crash TimeSharing, El Cajon, CA Lines: 42 X-Local-Date: 28 Jul 90 12:13:09 PDT In article <90204.194456UH2@psuvm.psu.edu> UH2@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 ================================================================================