Can a password file be copied from one linux machine to another?

Posted on 2006-04-17
Last Modified: 2013-12-06

I have created a new email server to replace the existing email server.  This server is using Centos (a free Red Hat Enterprise clone)  The original server was purchased preconfigured and is using sendmail.  The new server is configured with postfix.

On the new server, I have created the same user accounts as appears on the mail server.  Ideally, I would like to be able to copy the password file from the existing mail server and install in on the new server so that all users will be able to use their existing passwords.  

Any thoughts?
Question by:TangledTech
    LVL 16

    Expert Comment


    Does your new mail server auth with /etc/passwd and /etc/shadow if so just copy these two files from your
    old server.

    Author Comment

    I believe so, but how so I confirm.

    LVL 16

    Accepted Solution


    If you dont use LDAP I am pritty sure it will be the /etc/passwd /etc/shadow files just copy them over
    also check through the /etc/passwd file for users you dont want anymore

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now