Solved

How do you backup linux user accounts and groups?

Posted on 2007-03-26
4
1,753 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

726 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