[comp.unix.i386] SCO Unix /etc/passwd question

UH2@psuvm.psu.edu (Lee Sailer) (07/24/90)

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?

Perhaps someone who has stayed abreast of developments in 3.2
would explain how the new passwd system works, since the encrypted
string are no longer in plain view.  Where'd they go?

                 thanks.

rogerk@sco.COM (Roger Knopf 5502) (07/25/90)

In article <90204.194456UH2@psuvm.psu.edu> UH2@psuvm.psu.edu (Lee Sailer) writes:
>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?
 
No. If you didn't change anything else, no problem. 

>Perhaps someone who has stayed abreast of developments in 3.2
>would explain how the new passwd system works, since the encrypted
>string are no longer in plain view.  Where'd they go?

The encrypted string is in the user's tcb entry in a directory
under /tcb/files/auth. The directory will be the same as the first
initial of the login and the entry within the directory will be
a file with the same name as login, ie user rogerk is:

	/tcb/files/auth/r/rogerk

Don't mess with this file unless you know what you are doing!
Passwords are generated much like under Xenix except that
they can be longer and we no longer truncate it to 8 bytes
before encryption (actually makekey does, but thats another
problem....).

We are trying to come up with a program that demonstrates
proper modification/update of the tcb files via the *prpwent
library calls but its not ready yet. We'll make it available
when its ready.

-- 
Roger Knopf                                      <standard disclaimer applies>
SCO Consulting Services			  "The True Believers will...formulate
uunet!sco!rogerk  or  rogerk@sco.com       a message that even a monkey could
408-425-7222 (voice) 408-458-4227 (fax)    understand."             --Jeff Tye

rick@crash.cts.com (Rick Stout) (07/29/90)

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
================================================================================