LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Samba: Adding Homes to PDC causes netlogon.bat script to not execute (https://www.linuxquestions.org/questions/linux-server-73/samba-adding-homes-to-pdc-causes-netlogon-bat-script-to-not-execute-730454/)

Neruocomp 06-03-2009 12:57 PM

Samba: Adding Homes to PDC causes netlogon.bat script to not execute
 
I have a samba server running as a PDC with ldap as its backend. The PDC does not have a [homes] directive as I have another samba server running on our file server that has the homes directive. It was no problem being that I had a script in [netlogon] called netlogon.bat that would mount the home directories on windows. Now everytime someone logs on, I get an error message in the logs that say service 'username' cannot be found. Well I tested it out with a user by creating a [username] directive. Well the message goes away, but now netlogon.bat is not being executed. And its not like it cannot be accessed. I can from windows navigate to \\pdc\netlogon and execute the script and have it mount the directories. Any ideas?

chitambira 06-05-2009 06:28 AM

need to see some conf here, how about your logon.bat???

Neruocomp 06-05-2009 11:54 AM

Code:

[global]
        workgroup = x.x.x
        netbios name = Ross
        server string = PDC %v
        map to guest = Bad User
        encrypt passwords = yes
        passdb backend = ldapsam:ldap://pavlov.x.x.x
        enable privileges = yes
        log level = 0
        syslog = 0
        time server = Yes
        socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=32768 SO_SNDBUF=32768
        add user script = /usr/sbin/smbldap-useradd -m '%u'
        delete user script = /usr/sbin/smbldap-userdel %u
        add group script = /usr/sbin/smbldap-groupadd -p '%g'
        delete group script = /usr/sbin/smbldap-group-del '%g'
        add user to group script = /usr/sbin/smbldap-groupmod -m '%u' '%g'
        delete user from group script = /usr/sbin/smbldap-groupmod -x '%u' '%g'
        set primary group script = /usr/sbin/smbldap-usermod -g '%g' '%u'
        add machine script = /usr/sbin/smbldap-useradd -w '%u'
        logon path = \\%L\profiles\%U
        logon script = netlogin.bat
#      logon drive = M:
#      logon home = \\%L\%U
        domain logons = Yes
        os level = 225
        preferred master = Yes
        domain master = Yes
        wins support = Yes
        ldap admin dn = cn=samba,ou=DSA,dc=x,dc=x,dc=x
        ldap group suffix = ou=group
        ldap idmap suffix = ou=Idmap
        ldap machine suffix = ou=machines
        ldap passwd sync = Yes
        ldap suffix = dc=x,dc=x,dc=x
        ldap ssl = start tls
        ldap user suffix = ou=people
        create mask = 0640
        directory mask = 0750
        case sensitive = No
        dont descend = /proc,/dev,/etc,/lib,/lost+found,/initrd
######### ACL Added 2006/12/21 by xxxx
#      interfaces = eth0 127.0.0.1
        interfaces = x.x.x.x 127.0.0.1
        hosts deny = ALL
        hosts allow = x.x.0.0/x.x.0.0
[netlogon]
        comment = Network Logon Service
        path = /etc/samba/netlogon
        guest ok = Yes
        browseable = no

[profiles]
        path = /etc/samba/profiles
        valid users = %U
        force user = %U
        writeable = yes
        read only = No
        create mask = 0600
        directory mask = 0700
        profile acls = Yes
        browseable = No
        csc policy = disable
        guest ok = no
[profiles.V2]
## For Vista
        copy = profiles
        path = /etc/samba/profiles/%U.V2


Then the netlogon.bat
Code:

NET USE * /DEL /YES

Net TIME \\ross.x.x.x

NET USE W: \\cajal.x.x.x\Public

NET USE X: \\cajal.x.x.x\homes


sunils1973 06-06-2009 04:52 AM

I think it is the issue with permissions

Check the netlogon directory(and similar specified in the smb.conf global aswell as homes sec)
whether the these directories are writable by the concerned users?

I have had also the same problem. But it solved though i don't exactly know how it solved. May be I changed the permissions

chitambira 06-08-2009 04:02 AM

in you smb.conf(G) you have;
Quote:

logon script = netlogin.bat
but your script is named netlogon.bat
Quote:

NET USE X: \\cajal.x.x.x\homes
you dont seem to have the [homes] section, so where are the users' home directories????


All times are GMT -5. The time now is 06:21 PM.