Fedora Linux Support Community & Resources Center
Old 1st February 2007, 07:39 AM
cpri Offline
Registered User
Join Date: Jun 2004
Posts: 116
Backup user/machine accounts and samba accounts


I like to make a backup of all the users in such way that if my server crashes I simply restore the users to a backup server. After this all my clients (win2K machines) can login without register them to the domain. This means I have to "copy" the machine accounts as well and also the samba accounts.

Can I just copy the following files

and restore them on my backup server. What will happen to the local root of the backup server if I do it this way?? Or are there beter ways

Thanks in advance
Reply With Quote
Old 6th February 2007, 10:11 AM
pbx's Avatar
pbx Offline
Registered User
Join Date: Dec 2005
Location: n00berland
Posts: 179
I would not copy /etc/passwd and /etc/shadow to the Backup Server (BS)... it can be damaged if both servers are not exactly the same!! If no damage is made to the BS then, at least, the local root of BS would have the same password of the server.

Note that /etc/passwd contains:
1st column: user_name (user name of user or program)
2nd column: x (shadow passwd pointing to the encrypted pass in /etc/shadow)
3th column: user_id (by default in FC the users id starts on 500. So if you add the first user it will be 500, the 2nd 501, etc)
4th column: group_user_id (same as user_id)
5th column: name (name of user)
6th column: home_directory (obvious )
7th column: bash_directory (points to the user bash location on users)

If you just add this to a new system, you would get a lots of errors because the home directory of local users is not created!
FC, by default, creates the home directory in /home when you add a new user, and adds the user info to /etc/passwd and encrypted user pass to /etc/shadow.
Plus, when you add a new user, FC will then copy to the user home directory the hidden configuration files located in /etc/skel/ (you can see them typing # ls -ali /etc/skel). So if no configuration files are created i think you will get more errors.

If you really want to make this you should copy, by hand (or making a script), only the line (in /etc/passwd and /etc/shadow) corresponding to user and add it to the backup server files, and then copy the hidden files in /etc/skel/ to the users home folder.
Just make sure that no users have the same number ID!!!

I think this will work but still not 100% sure of it

About samba, I guess there will be no problem (copy also smb.conf)

Using linux (FC) since Nov 2004 | Linux user # 435547 | smolt profile | do u know this?

Last edited by pbx; 6th February 2007 at 10:14 AM.
Reply With Quote

accounts, backup, samba, user or machine

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba adding machine accounts on the fly. DirtySanchez Servers & Networking 3 6th October 2005 06:12 AM
where does samba keep its computer accounts? budds Servers & Networking 6 29th April 2005 07:39 AM
Backup user accounts dih Using Fedora 6 20th November 2004 04:16 AM

Current GMT-time: 19:31 (Sunday, 24-09-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat