Solved

How do you backup linux user accounts and groups?

Posted on 2007-03-26
4
1,750 Views
Last Modified: 2007-12-19
What is the correct way to backup/restore linux user accounts and groups?

With a clean OS install can you just copy a backup of /etc over... I was told not good for user accounts so then how?


Thanks!
0
Comment
Question by:techwhore
  • 2
4 Comments
 
LVL 32

Accepted Solution

by:
Kamran Arshad earned 125 total points
ID: 18798102
0
 

Author Comment

by:techwhore
ID: 18802557
Actually that is the article I was reading. What I am unsure of however is how to deal with a tar backup of /etc that contains the accounts.... I don't think that this solution applies because it is talking going from one live system to another live system... I am guessing there is a difference?

Thanks!
0
 
LVL 1

Expert Comment

by:crovaxy
ID: 18822562
If you have a tarball containing the /etc directory of the old server, just uncompreed it to somewhere (eg: /tmp/old_etc/) and parse follow the article you're reading. Use the path /tmp/old_etc/ instead of /etc when creating the .mig files, eg:

# awk -v LIMIT=$UGIDLIMIT -F: '($3>=LIMIT) && ($3!=65534)' /tmp/old_etc/passwd > /root/move/passwd.mig

instead of:

# awk -v LIMIT=$UGIDLIMIT -F: '($3>=LIMIT) && ($3!=65534)' /etc/passwd > /root/move/passwd.mig

After the .mig are created, follow the article as it is.
0
 
LVL 1

Assisted Solution

by:crovaxy
crovaxy earned 125 total points
ID: 18822573
If you already have new user accounts created on the new system, pay attention to the UIDs used by the users you're migrating. They should NOT collapse with the ones existing in the new server. If you're unsure about this, edit the /etc/passwd and the /tmp/old_etc/passwd file and check if there's users using the same UID (not applicable for the system users (< 500)... they won't be migrated if you follow the article).
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now