LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-28-2005, 05:26 AM   #1
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Rep: Reputation: 30
backing up accounts


hi all,

I want to transfer my users account to another computer/server. How do i do this? files involved eg /etc/passwd , /etc/shadow, /etc/groups etc. or any other simple way? thanks in advance.
 
Old 11-28-2005, 06:03 AM   #2
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
basically, just transfer /home/<yourusername> to the /home folder of your new machine. Settings are stored as /home/<yourusername>/.kde, for kde - just an example. /etc only contains global settings, such as passwords or default scripts.
When you create a new account on your new system, simply instruct the program not to create a new account but use that one instead. Then use passwd to set your password.
Careful if you are using gpg: transfer your trust databases from /var to your new system as well!
 
Old 11-29-2005, 06:20 AM   #3
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Original Poster
Rep: Reputation: 30
Is there any backup software to do just that easily?
 
Old 11-30-2005, 12:50 AM   #4
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
Yep, the good old tarball archive. Take a look at 'man tar' or 'info tar'. gzip the archive for convinience.

Go to /home, type 'tar -c -f <whatever you want to call the file> ./<your home folder> -v' and watch your home folder being tarballed (doesn't influence the real files, just copies them). When it is done, type 'gzip -9 ./<the file name>' to reduce its size. done :->.

If it fits onto a cd, burn it, or split the file and transport it with a usbstick piece by piece, whatever suits you. If the computers are networked, send the file via mail or ftp.

On the other side, just 1)gzip -d <the filen ame> and 2) tar -x -f <the file name> while in the /home folder as root. Should work.

If you hate the most handy tool of all though -the console-, you can use ark. It does exactly the same thing, only in graphical mode.
 
Old 11-30-2005, 06:46 PM   #5
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Original Poster
Rep: Reputation: 30
how about user accounts? e.g in /etc/passwd,/etc/shadow./etc/groups etc.. can we just tarballed them and extract them on the new comp.?
 
Old 12-01-2005, 01:41 AM   #6
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
You can, but the consequence would be that you would erase all users and groups on the new computer and replace them with the old ones.

Be careful however with files such as fstab or other system specific files. For example, if you copy an fstab defining disk quotas and they are not available on your new system, the disk might not be mounted (or mounted read only)...

I would still propose you add the users manually (look at 'man adduser'), its less risky. The settings are still in the home folders. Copying /etc will only give you a hard time readjusting your system, but it won't make your user administration any easier, in fact, I expect that it would complicate the given task...
 
Old 12-01-2005, 03:48 AM   #7
gombwe
LQ Newbie
 
Registered: Aug 2005
Location: Zimbabwe
Posts: 11

Rep: Reputation: 0
Unhappy copying user accounts

Connect the two severs on the network and assign different ip addresses.Log on as root to the server you want to transfer the user accounts and use scp command to transfer your files.Its the easiest way of tranferring your files from one server to another.


Regards,

Gombwe
 
Old 12-04-2005, 09:22 PM   #8
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Original Poster
Rep: Reputation: 30
i see. thanks all. Actually I want to transfer all accounts on my mailserver. I just read of dbmail and I just think that it is a good idea to have emails stored in database. easier maintenance, backup, recovery and transfer. I'm woriking on it.
 
Old 12-05-2005, 06:40 AM   #9
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Copying /etc/passwd , /etc/passwd- , /etc/group , /etc/group- , /etc/shadow , /etc/shadow- & home folders of all the users will provide you a mirror copy of existing accounts over to new box.

I even migrated a SAMBA PDC over to new boxes succesfully in around 15 mins.

Last edited by amitsharma_26; 12-05-2005 at 06:55 AM.
 
Old 12-15-2005, 03:01 AM   #10
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Original Poster
Rep: Reputation: 30
Smile

Quote:
Originally Posted by amitsharma_26
Copying /etc/passwd , /etc/passwd- , /etc/group , /etc/group- , /etc/shadow , /etc/shadow- & home folders of all the users will provide you a mirror copy of existing accounts over to new box.

I even migrated a SAMBA PDC over to new boxes succesfully in around 15 mins.
i see. that's promising. i'm nearly want to manually key-in one-by-one of my 200 users info. Later, i'll migrate them to dbmail from uw-imap-based system. i'll report it here what progress i can make.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Backing up ChristineCrawford Linux - Newbie 8 12-17-2005 07:21 AM
samba accounts/ unix accounts Buzz88 Linux - Newbie 3 09-25-2005 08:16 AM
qmail -- new accounts can't receive mail, but old accounts can b:z *BSD 1 07-13-2005 12:42 AM
Backing up osx Linux - General 5 03-24-2003 02:09 PM
backing up ! Snake007uk Linux - General 1 07-14-2002 04:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration