LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-03-2009, 12:57 PM   #1
Neruocomp
Member
 
Registered: Oct 2004
Distribution: Slackware, CentOS
Posts: 135

Rep: Reputation: 15
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?
 
Old 06-05-2009, 06:28 AM   #2
chitambira
Member
 
Registered: Oct 2008
Location: Online
Distribution: RHEL, Centos
Posts: 373
Blog Entries: 1

Rep: Reputation: 51
need to see some conf here, how about your logon.bat???
 
Old 06-05-2009, 11:54 AM   #3
Neruocomp
Member
 
Registered: Oct 2004
Distribution: Slackware, CentOS
Posts: 135

Original Poster
Rep: Reputation: 15
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
 
Old 06-06-2009, 04:52 AM   #4
sunils1973
Member
 
Registered: Jan 2007
Location: INDIA
Distribution: Ubuntu, Debian
Posts: 340

Rep: Reputation: 30
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
 
Old 06-08-2009, 04:02 AM   #5
chitambira
Member
 
Registered: Oct 2008
Location: Online
Distribution: RHEL, Centos
Posts: 373
Blog Entries: 1

Rep: Reputation: 51
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????
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute a ssh script on Linux server from Windows through a bat script? wanna13e Programming 13 10-23-2009 02:41 AM
Problem with netlogon script in Samba avinash.rao Ubuntu 8 09-03-2009 08:29 AM
XP not loading logon.bat in Samba's Netlogon kenji1903 Linux - Networking 9 09-01-2004 09:41 PM
Remote Win Bat File execute Shell Script on AIX Server DriveMeCrazy AIX 5 05-26-2004 06:24 PM
My samba netlogon script doesn't execute colpaarm Linux - Software 1 07-25-2003 09:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration