Date: Sat, 28 Feb 2004 13:53:12 -0600 From: Bob Martin <bob@buckhorn.net> To: "Scott St. John" <ssj@scottah.com> Cc: freebsd-isp@freebsd.org Subject: Re: Final conversion questions Message-ID: <4040F1A8.1070108@buckhorn.net> In-Reply-To: <20040228191105.M42305@scottah.com> References: <20040228191105.M42305@scottah.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Scott, I haven't followed this thread closely enough, but from what you're saying, it sounds like you have a NFS connection between the 2 boxen. That being the case, and since the UID/GID's are the same on both boxen (IIRC you moved the Linux accounts to the BSD box), the following command will get all of the files, and maintain the permissions: cp -pRP /<linux mount point/home/* /home/ If the UID/GID's have changed, then this command will fix them for you: (Note, this assumes you use bash as your shell) cd /home for a in `ls -1 /home`;do chown -R $a:users $a;done That command does assume that you have a 1 to 1 relationship between home directories and usernames. If not, let me know and I'll find my little perl script that reads /etc/passwd and sets the permissions. Bob Martin Scott St. John wrote: > Thanks to help from this list I am proud to say that tonight I will be > moving our mail server from Linux/Sendmail to FreeBSD/Postfix! The user > passwd file has been converted and we are ready to rock, but I have a few > questions before I begin tonight. > > I plan to copy the users home directories over, does anyone have a script > that will go through the home directories and correctly set the ownership of > the directories once they are copied over? Example, user Fred has a home > dir on the old machine, I copy over the files to the BSD box, I need to > chown -R fred:users to his home directory. I could do it by hand, but I am > sure there has to be a script out there to do something similar? > > Second question, I want to make sure ALL files are copied over from the home > directories and I think I have the syntax wrong to get the files, I want > the .procmailrc files to transfer over. > > Thanks in advance! > > -Scott > > _______________________________________________ > freebsd-isp@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-isp > To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4040F1A8.1070108>