LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-02-2014, 07:43 PM   #1
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Rep: Reputation: Disabled
move user account to another server


I have a web server , there are many FTP account and mysql account in it , I would like to move these account to another server , if I newly create these account , the password will be changed as I do not know user password , would advise how can I move these system account but keep the same password in new server ? thanks

Last edited by byran cheung; 12-02-2014 at 08:03 PM.
 
Old 12-02-2014, 09:14 PM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,156

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Google is your friend!!

There are some fine WIKI and HOW-TO pages that cover this better than I can, but here is the cheatsheet:
First, check for collisions in the following. You may have trouble doing it this way if UID or PID collisions are involved.
1. Tar up the home folder, if approriate. Unpack this in proper location on new server.
2. Copy the entries for the user in /etc/group and replciate on the new server.
3. Copy the line for this user from /etc/passwd and add that line to the new server.
4. Copy the line for the user from /etc/shadow and add it to /etc/shadow on the new server.

You may also have to check /etc/gshadow if it is used. Most often not.

Test the account and verify permissions, ownership, shell, etc.


If you are obsesive, you could alos migrate the mail file for the user. I seldom find that useful, but only you can tell if it is approriate.

NOTE 1: These assume you do not make major use of NIS/NIS+, LDAP, WINBINDD or other tools that tie users to central management, group, or domain.
NOTE 2: if you are NOT using the shadow system, it is even less difficult but your systems are FAR less secure!
 
1 members found this post helpful.
Old 12-02-2014, 09:15 PM   #3
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 81
what type of FTP setup do you have ?

mysql can be moved by moving database, take a dump and move it to another server--> restore it and start service.
 
Old 12-03-2014, 12:33 AM   #4
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by wpeckham View Post
There are some fine WIKI and HOW-TO pages that cover this better than I can, but here is the cheatsheet:
First, check for collisions in the following. You may have trouble doing it this way if UID or PID collisions are involved.
1. Tar up the home folder, if approriate. Unpack this in proper location on new server.
2. Copy the entries for the user in /etc/group and replciate on the new server.
3. Copy the line for this user from /etc/passwd and add that line to the new server.
4. Copy the line for the user from /etc/shadow and add it to /etc/shadow on the new server.

You may also have to check /etc/gshadow if it is used. Most often not.

Test the account and verify permissions, ownership, shell, etc.


If you are obsesive, you could alos migrate the mail file for the user. I seldom find that useful, but only you can tell if it is approriate.

NOTE 1: These assume you do not make major use of NIS/NIS+, LDAP, WINBINDD or other tools that tie users to central management, group, or domain.
NOTE 2: if you are NOT using the shadow system, it is even less difficult but your systems are FAR less secure!

it works , thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to clone a user account from one server to other server ZAMO Linux - Enterprise 5 03-19-2010 01:40 AM
FTP server setup - user account papillon123456 Linux - Server 2 01-30-2009 11:48 AM
Getting user account information from server the_transltr Linux - Server 8 09-15-2008 01:13 PM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 10:02 AM
mail server user account admin? bejamex Linux - Software 0 06-22-2003 09:59 PM


All times are GMT -5. The time now is 07:49 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration