Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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!
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.
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...
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.