?
Solved

How do you backup linux user accounts and groups?

Posted on 2007-03-26
4
Medium Priority
?
1,756 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 375 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 375 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

What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

Question has a verified solution.

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

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 …
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.…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month12 days, 18 hours left to enroll

777 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