Solved

How do you backup linux user accounts and groups?

Posted on 2007-03-26
4
1,754 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

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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.

728 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