[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] Re: Help?: Windows to Samba bulk user add (cliebow@midmaine.com)



Matt and Chuck thanks for the advice! I REALLY appreciate it. This is
just what I am looking for.

John


On 12/21/05, Matt Oquist <moquist majen net> wrote:
> If I were you I'd just use rsync.  So what you want to do is go to the
> Samba server and do something like this:
> $ mkdir -p /mnt/tmp
> $ mount -t smbfs -o username=windersuser,password=winderspw //windersserver/sharename /mnt/tmp
>
> Then do something like this:
> $ rsync -avu /mnt/tmp/ /home/
>
> The "-u" in the rsync command ensures that even if you stop the rsync
> command and have to start it again, it won't re-copy everything it's
> already copied.
>
> Then you'll have to
> 1. make sure that all your users exist on the Samba machine (either by writing a little script or using some other method, such as 'net rpc vampire')
> 2. make sure that the Linux users own their proper home directories
>    Something like this should do the trick, *if* your users' home dirs
>    have the same names as the usernames, and *if* your users are
>    regular Linux users (in the /etc/passwd file instead of LDAP, for
>    example):
>    $ cd /home
>    $ for hdir in `ls | sed 's/\///'`; do grep -q "^$hdir:" /etc/passwd && echo chowning $hdir && chown -R $hdir:users $hdir; done
> 3. make sure the Linux users have proper permissions to their home directories
>    $ chmod -R u=rwX,g=,o= /home/*
>
> This should get you on your way, though if you have different
> usernames in Linux, or if the user's homedirs don't match their
> usernames, you've got to do more complex things than these.
>
> --matt
>
> > From: cliebow midmaine com
> > Subject: Re: [K12OSN] Help?: Windows to Samba bulk user add
> >
> > when i migrated users homedirs from a winblows to a samba fileserrver.all
> > idid was make sure usernames matched...mounted the windows directory on to
> > the samba machine and wrote a little script that moved My Documents oer
> > for each user..Ill look for it tomorrow if you need it..the script is
> > basically trivial..chuck
> >  Hi all,
> > >
> > > I am trying to find a way to migrate 800 users file stores from
> > > Windows 2k3 AD to Samba. Is there a way to move the data in users file
> > > shares without having to create and move each user and  directory by
> > > hand? I've seen some ldap tools that seem to do this but since I am
> > > not using OpenLdap for authentication I am not sure if they would
> > > work.
> > >
> > > TIA!
> > >
> > > John
> --
> Open Source Software Engineering Consultant
> http://majen.net/
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iD8DBQFDqZj83kS9TYiZBvMRAgxbAKCZUBBc8PlVuKVCABurgr+19BG/hgCgkbwQ
> Hq4VackhgrGba97WMgChXh0=
> =h0oM
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> K12OSN mailing list
> K12OSN redhat com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
>
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]