[Samba] Login Scripts in LDAP

Corey Hart chart at acad.stedwards.edu
Wed Aug 27 19:17:16 GMT 2003


Here is how mine is setup:

# Global parameters
[global]
        workgroup = STEDS
        netbios name = EDSHARE
        server string = Steds File Share
        interfaces = 209.99.108.82 127.0.0.1
        bind interfaces only = Yes
        encrypt passwords = Yes
        log level = 2
        time server = Yes
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192
        add user script = /usr/sbin/useradd -d /dev/null -g 527 -c
Machine -s /bin/false -M %u
        domain logons = Yes
        os level = 255
        preferred master = Yes
        domain master = Yes
        wins support = Yes
        ldap server = ldap1.stedwards.edu
        ldap port = 9111
        ldap suffix = dc=stedwards,dc=edu
        ldap admin dn = cn=Manager,dc=stedwards,dc=edu
        ldap ssl = no
        invalid users = bin daemon sys man postfix mail ftp
        admin users = root coreyh
        load printers = yes
        printing = cups
        printcap name = cups
        log file = /usr/local/samba/install/var/log/log.%U
        logon script = scripts\%U.bat
        logon drive = S:
        logon home = \\%N\%U

[netlogon]
        Comment = Netlogon Shares
        path = /usr/local/samba/install/lib/netlogon
        browseable = No
        guest ok = no
        writable = no
        write list = admin
        locking = no
; call the shell script (make_logon_script) with parameters :
; %m (machine netbios name) %U (user) %a (architecture) %g (group) %L
(server)
; perhaps you prefer : %u, %G, ...
; quote in case of spaces
        root preexec = /usr/local/samba/install/bin/make_logon_script
'%m' '%U' '%a' '%g' '%L'

I then set my path in openldap to this:

dn:uid=coreyh

         cn: Corey Bruce Hart
         sn: Hart
  givenName: Corey_Bruce
objectClass: top
             person
             organizationalPerson
             uidObject
             inetOrgPerson
             sambaAccount
       mail: coreyh at blah.com
        uid: coreyh
        rid: 49766
 scriptPath: scripts/coreyh.bat


Bruno Tobias Stella wrote:

> Hi !
>
>  I use Samba with OpenLDAP. The Samba users information are
> keept in LDAP. I'd like to keep the login scripts in LDAP.
> Something knows how can I do this ? And how Samba would read the
> login scripts in LDAP and not in netlogon directory ?
>
> Thanks,
>
> Bruno Stella
>
> PS: Sorry by my English :-)
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba

--
----
Corey Hart
Systems/Security Analyst
St. Edward's University
coreyh at admin.stedwards.edu
512/428-1038 - voice
512/448-8492 - fax
512/470-8462 - cell






More information about the samba mailing list