Results 1 to 8 of 8

Thread: Backing up user accounts

  1. #1

    Backing up user accounts

    I have a box I need to rebuild. If I want to move existing users from this box to the new one, can I simply backup up their /home directories, /etc/passwd and shadow password and move them to the new box? I realize permissions will have to be reset on the home directories, but is there anything else that needs to be done? Is this even possible? Am I missing something? Can it be that simple?

  2. #2

    Re: Backing up user accounts

    it can be done this way .. I have my /home on a separate partition , so when I needed to reinstall my distro I just formatted the other partitions and remounted the /home under /home ... then I recreated my username and set the permissions of the home dir.
    You can copy the passwd and shadow files but it isnt needed you could also
    just readd the user with useradd

  3. #3

    Re: Backing up user accounts

    You can copy the passwd and shadow files but it isnt needed you could also
    just readd the user with useradd
    Thanks for the tip on the /home partition. I did not think of that one.

    However, I'd rather not readd my users as there are about 450 of them. Which shadow files will I need to move in order for the passwords to remain the same after the reinstall? I noticed there is a shadow as well as a shadow-. Are there any other files associated with these?

  4. #4

    Re: Backing up user accounts

    hmm the shadow- looks like a backup of the shadow , cause when i create a new user all information gets stored in shadow not in the other one .. I would only copy shadow, passwd, group

  5. #5

    Re: Backing up user accounts

    Don't forget about /var/mail. Each file with proper permissions (tar can do that for you).

    Do you use samba ? Remember smbpasswd.

  6. #6

    Re: Backing up user accounts

    also gshadow if you use group shadow passwords (if you don't use group passwords then don't worry about it)

    and ~ or - just mean it's a backup

  7. #7

    Re: Backing up user accounts


    Don't forget about /var/mail. Each file with proper permissions (tar can do that for you).

    Do you use samba ? Remember smbpasswd.
    There are actually a large number of directories that I'm going to tar before I re-install, var/spool/mail and /var/www/html being among them. Tar will perserve permissions? Winduhs creates a unique SID for each user account, does *nix do anything like this, or is everything maintained in passwd and shadow?

  8. #8

    Re: Backing up user accounts

    One note, if you backup passwd, group, and shadow, you will not need to change ownership of files. Tar is capable of preserving ownership of files. There's a certain switch though and you'll need to read the man page to figure out what. (I think it's -k.) Tar remembers what user id number owned the file, but if you backup passwd, group, and shadow, all the users will still have the same uid. Otherwise you'd have to recreate the users and they could have different uid's, messing up ownership. When gonzojohn posts my tutorial at LinuxOrbit on backing up your hard drive to cd's, you could look at it for a good reference. (And I mean very good. [smiles])

Similar Threads

  1. How can I limit user accounts on Windows Server 2000?
    By AnthonyDamasco in forum Windows - General Topics
    Replies: 3
    Last Post: 12-21-2006, 12:20 PM
  2. user accounts
    By trace in forum Windows - General Topics
    Replies: 2
    Last Post: 07-06-2005, 08:47 PM
  3. create linux user accounts over the internet
    By samanthi in forum Linux - Software, Applications & Programming
    Replies: 3
    Last Post: 05-27-2005, 04:50 PM
  4. NO ACCESS TO USER ACCOUNTS
    By anthrvictim in forum Windows - General Topics
    Replies: 1
    Last Post: 05-13-2005, 12:34 PM
  5. Create and Configure User Accounts in Windows XP
    By regix in forum Windows - General Topics
    Replies: 0
    Last Post: 01-04-2005, 07:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •