Re: Final conversion questions

From: Bob Martin (bob_at_buckhorn.net)
Date: 02/28/04

  • Next message: Scott St. John: "Re: Final conversion questions"
    Date: Sat, 28 Feb 2004 13:53:12 -0600
    To: "Scott St. John" <ssj@scottah.com>
    
    

    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"

    _______________________________________________
    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"


  • Next message: Scott St. John: "Re: Final conversion questions"

    Relevant Pages

    • Re: Help Needed configuring Samba on Webserver
      ... Trevor TeC Christian wrote: ... >> script that accepts the students name,username and password and then ... > place the same within the newly added users home directories upon creation? ...
      (Fedora)
    • Re: Problem with smb shares.
      ... And yes if the directoties reside on a widows server there ... Software that expects to create symlinks in the users' home directories ... What sort of filesystem does it have? ... and set users home directories to be something ...
      (Fedora)
    • Re: Remote user creation
      ... setacl.exe along with script by Richard Mueller ... > I have a need to create student accounts with home directories ... > It appears that when the home directory is created on a server it does not ... > know about the account that was just created and cannot assign the proper ...
      (microsoft.public.windows.server.scripting)
    • move home drive script question
      ... I need to move all the home directories to a new drive. ... the script works fine (well it did before I tried to clean ... But to get the home directory to map I have to touch every account. ... 'get the lenght of the path of the current name ...
      (microsoft.public.windows.server.active_directory)
    • Re: Logon Scripts
      ... > Now i assign home directories to users. ... > coding and where to place that coding. ... Place these lines into your logon script: ... Specify its name in each and every account profile in the "Logon Script" ...
      (microsoft.public.win2000.general)