24.2.12

Samba 4 Windows Profiles

Today we went a step closer to not having to dedicate a whole windows 7 box just to administer our lan.
Aim
To automate this:

Method
We created our POSIX-ified Samba 4 user as described here, and then searched


Before
# ldbsearch --url=/usr/local/samba/private/sam.ldb 'cn=steve6' | grep '\\hh3'
<nothing>
and
After
# ldbsearch --url=/usr/local/samba/private/sam.ldb 'cn=steve6' | grep '\\hh3'
profilePath: \\hh3\profiles\steve6
homeDirectory: \\hh3\home\steve6
What do they call Z:?
# ldbsearch --url=/usr/local/samba/private/sam.ldb 'cn=steve6' | grep Z:
homeDrive: Z:

Prototype
Make a cheap and cheerful ldif:
cat profile.ldif
dn: cn=lynn2,cn=Users,dc=hh3,dc=site
changetype: modify
add: profilePath
profilePath: \\hh3\profiles\steve6
-
add: homeDrive
homeDrive: Z:
-
add: homeDirectory
homeDirectory: \\hh3\home\steve6

Then a quick:
ldbmodify --url=/usr/local/samba/private/sam.ldb profile.ldif

TODO
Automate on the names profiles and home from smb.conf. Give a choice of drive letters to map? Does it matter? Then include in our POSIX s4user script.
Neat:-)


No hay comentarios:

Publicar un comentario