1833828 Members
2464 Online
110063 Solutions
New Discussion

Re: Passwd & group file

 
rajeshk
Advisor

Passwd & group file

Hi,
I took the backup copy of passwd file,group file and home directory tar file from 11-00.
Now i need to use the same users/password and home directories which they already used. Can i replace the current one to old which i took backup. Does it face any problem. But when i use untar UID & GID show's somes numbers.

How to proceed this? Help me.

Thx
K.Rajesh
2 REPLIES 2
Jose Mosquera
Honored Contributor

Re: Passwd & group file

Hi,

Are you sure that is the same files structure?
If not try untaring them in other directory!

To ensure same UID and GID of these files, first make a "tar -tvf " and look if stored UID and GID correponding with your current UID and GID of your /etc/passwd and /etc/group files. To show your currents UID and GID values use:

#ll -n /etc/passwd /etc/group
Then, third and fourth columns show you the current owner a group ID's of these files. These numbers must match with third and fourth fiels (":" separated)of owner definition into /etc/passwd file. And fourth column (GID) of /etc/passwd file must match with third column (GID) into /etc/group file.

In any case, I suggest you that make a copy of these **important** files and compare them before overwite them, of course, to do this you need untar stored files into anoter dir. To compare current files with stored files you can use diff command (man diff). In case of "go back" action will be needed, just rename your previous copies to original names.

Rgds.
Steven E. Protter
Exalted Contributor

Re: Passwd & group file

If you follow post 1 guidelines you can get away with the transfer.

It's far easier to add the groups in new and then the users with a temporary password.

Set them up to require password change at next login(with sam or passwd command line). You also want to make sure the id is only good for a limited time period. I'd go trusted system to make this stuff easier.

When you go live you notify the user community that there will be a forced password change and they must log in and use their id's within say 5 business days.

Though I rarely discuss PR, such a move shows you and your department as security conscious, and makes it known that a new system is going into production. A little positive visibility never hurts at salary and budget time.

* Note: A friend trying to reach me at work had to speak to six people before he found anyone that knew me. With no production downtime in two years my users don't know who I am or what I do at all any more.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com