Author Topic: Zentyal 4.0 Logon Script  (Read 7852 times)

Hatokad

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Zentyal 4.0 Logon Script
« on: November 12, 2014, 10:00:10 am »
Throughout the versions it seems that the location that stores logon scripts for Samba has changed.  Does anyone know where I should stick logon.bat for version 4.0?



Thanks

ian

  • Community Council Member
  • Zen Samurai
  • *****
  • Posts: 296
  • Karma: +10/-1
    • View Profile
    • Familie site
Re: Zentyal 4.0 Logon Script
« Reply #1 on: November 12, 2014, 10:21:17 am »
Hello,

The logonscript is stored in the map:

/var/lib/samba/sysvol/domainname/scripts

Where domainname is the name of your domain.

See also the file smb.conf for the path of the logonscript

nano /etc/samba/smb.conf and the contents is dispayed.

Best regards,
Ian

Hatokad

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Zentyal 4.0 Logon Script
« Reply #2 on: November 12, 2014, 01:50:52 pm »
I've tried adding the login.bat script here as well as creating a GPO and linking it to the OU with the test user I'm trying this with, and it still isn't running the script when I log in...

Any thoughts?


Thanks

Hatokad

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Zentyal 4.0 Logon Script
« Reply #3 on: November 12, 2014, 06:29:51 pm »
So I am able to run the command CALL \\serverIP\netlogon\logon.bat from the Windows machine and it runs the script exactly as I would like it to... it just isn't running it automatically at login.

I have the Default Domain Policy pointing to this startup script. I have also created a new GPO that points to it only for this specific user and it still isn't pulling up at login.

Am I missing something? All the video guides/text guides seem to be exactly what I've done, but still not working.
« Last Edit: November 12, 2014, 07:31:26 pm by Hatokad »

Hatokad

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Zentyal 4.0 Logon Script
« Reply #4 on: November 12, 2014, 07:57:13 pm »
Tried recreating logon.bat from a windows machine (instead of via ssh) and uploading it via web portal.
Tried restarting samba service.

Can still call the batch file via cmd line with the command listed in the previous post, but it still isn't running on logon.

Hatokad

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Zentyal 4.0 Logon Script
« Reply #5 on: November 12, 2014, 08:10:05 pm »
I have:

Made sure the Windows client has Zentyal as its DNS server
Made sure both Server and client are perfectly time sync'ed using NTP

Hatokad

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Zentyal 4.0 Logon Script
« Reply #6 on: November 12, 2014, 09:36:51 pm »
I have tried removing the Windows client from the domain and readding it.

ian

  • Community Council Member
  • Zen Samurai
  • *****
  • Posts: 296
  • Karma: +10/-1
    • View Profile
    • Familie site
Re: Zentyal 4.0 Logon Script
« Reply #7 on: November 13, 2014, 10:37:01 am »
The only thing you need is :

Put the logon.bat scipt in the map:
/var/lib/samba/sysvol/domainname/scripts

Where domainname is the name of your domain.

In the webadmin gui "Domain" select a drive letter for your home map.

Put the windows clients in the domain ( domain PDC must be also DNS server, the windows clients must be poited to the PDC DNS ).

There is no other setting needed ( no GPO nothing else ).

Best regards,
Ian


Hatokad

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Zentyal 4.0 Logon Script
« Reply #8 on: November 13, 2014, 07:18:54 pm »
The only thing you need is :

Put the logon.bat scipt in the map:
/var/lib/samba/sysvol/domainname/scripts

Where domainname is the name of your domain.

In the webadmin gui "Domain" select a drive letter for your home map.

Put the windows clients in the domain ( domain PDC must be also DNS server, the windows clients must be poited to the PDC DNS ).

There is no other setting needed ( no GPO nothing else ).

Best regards,
Ian



This is the initial set up that I tried. Still having an issue.

IvanD65

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Zentyal 4.0 Logon Script
« Reply #9 on: November 16, 2014, 03:16:40 pm »
The issue might be within the script.

I've been struggling with it too: it seemed like the script wasn't run at login, while in fact it díd run, but just didn't do what it was supposed to do.

It works fine after I altered the commands fom 'net use X: \\HOSTNAME\sharedfolder'  to 'net use X: \\DOMAINNAME\sharedfolder'