Computing.Net > Forums > Linux > editing /etc/passwd

editing /etc/passwd

Reply to Message Icon

Original Message
Name: Audry
Date: February 25, 2003 at 15:20:35 Pacific
Subject: editing /etc/passwd
OS: Redhat 7.1
CPU/Ram: dont know
Comment:

My lab runs a workgroup type setup with 7
computers all running various versions of
Redhat 7 and up. There are about 9 students
in the lab, each of them having an account on
each of the machines. My boss wants me to
make it so that the /etc/passwd file is the
same on each computer- i think (and i could
very well be wrong) what he wants is for a
certain user to be able to access, copy,
move any of their files from one machine to
another.
I guess my first question is... is my
interpretation correct... or is there another
reason for wanting the /etc/passwd files the
same on all of the computers
and my second question is-- well, every where
i look i see big klaxons ringing about not
editing the /etc/passwd file manually. Is
there another way to keep this file the same
on all the computers with-out having to
manually edit the file.. or is there
something else i can do to achieve the
(believed) above goal.
Thanks
Audry



Report Offensive Message For Removal

Response Number 1
Name: Jake
Date: March 1, 2003 at 21:08:42 Pacific
Subject: editing /etc/passwd
Reply: (edit)

Editing files is the easiest way. All you have to do is find the lines for your users in /etc/passwd AND /etc/shadow, and copy them to the same files on the other systems. If all the systems use the same version of the same distribution, you should also be able to just copy and replace the files. Either way, when you're done, do this:

rm -f /etc/\#shadow\# /etc/shadow~
chmod 600 /etc/passwd /etc/shadow

That'll delete copies of /etc/shadow that may have been created by editing it and make sure the permissions are correct for both files.

There's probably a better way to solve the actual problem, but this is how to implement your boss's solution.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: editing /etc/passwd

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software