Author Topic: Logon script zentyal-logon.bat  (Read 13251 times)

maxprox

  • Zen Apprentice
  • *
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Logon script zentyal-logon.bat
« on: September 18, 2011, 03:19:22 pm »
Hello,

I can't find a suitabel answer.
Last week I worked half a day on an individual logon script. I do it in the file:
/home/samba/netlogon/zentyal-logon.bat
Today I see that all the work is gone!  (I work with a new zentyal 2.2)
Now I realize that any change in the web frontend results in both, the line in the smb.conf 'logon script = zentyal-logon.bat" as well as the script "zentyal-logon.bat" even written back  :-((

How / where or by what name do I have to create my own custom logon scripts?
For my own individual logon scripts? Which after the next updates still remain.
That is my question

Regards,
maxprox


« Last Edit: September 18, 2011, 03:23:45 pm by maxprox »

stuartiannaylor

  • Guest
Re: Logon script zentyal-logon.bat
« Reply #1 on: September 18, 2011, 03:58:50 pm »
zentyal runs on templates and you need to edit the template files rather than the end files.

from memory its usr/share/ebox/stubs



maxprox

  • Zen Apprentice
  • *
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Logon script zentyal-logon.bat
« Reply #2 on: September 18, 2011, 10:22:59 pm »
Hello,

thank you for the answer.
Okay -  with your help I found it under:
Code: [Select]
/usr/share/zentyal/stubs/samba/logon.bat.masBUT I hope that "zentyal" not seriously mean to want to edit this file???
I work for example with the SME-server and a school solution (paedML - only in Germany) and both use similar templates ...
BUT both are predefined include lines, which remain well preserved forever.
And also the include files already exist, but are never changed by the distribution.
And vice versa, it never makes sense to modify a template, which is still broken after the next update  :-\
So, what is the official -zentyal- way

regards,
maxprox

christian

  • Guest

maxprox

  • Zen Apprentice
  • *
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Logon script zentyal-logon.bat
« Reply #4 on: September 18, 2011, 11:48:48 pm »
Hello,

I have to read it twice to understand everything.
But if I really need to change the templates ...
Quote
Therefore, if you want to make your changes persistent, and prevent them from
being overwritten every time Zentyal saves changes, you must edit such templates
instead of system configuration files.

I personally think the solution is not so good.
The clear separation of system templates and individual user files seems a
cleaner solution (e.g. with include lines) -> IMHO
There is still a second option for me:
http://forum.zentyal.org/index.php/topic,6653.msg26811.html#msg26811
I'll try both

thank you,
maxprox

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Zentyal Server Lead Developer

maxprox

  • Zen Apprentice
  • *
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Logon script zentyal-logon.bat
« Reply #6 on: September 19, 2011, 11:58:42 pm »
Hello J. A. Calvo,

thanks, I will read it.
This information  let me understand more and more the system of zentyal.
This approach is very new to me.

Quote
...
There is still a second option for me:
http://forum.zentyal.org/index.php/topic,6653.msg26811.html#msg26811
I'll try both ...

In my first test this second way seems to go (link above)

Quote
So if you want to add custom behaviour, you can put a 'logon.bat' file, or copy the zentyal-logon.bat to logon.bat and do the needed changes. As with other Zentyal modules you can also use hooks to override the default behaviour.

thank you,
maxprox

guillo

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Logon script zentyal-logon.bat
« Reply #7 on: June 14, 2015, 05:01:47 am »
I found an answer here, in spanish, that worked for me.
http://www.itwebpoint.com/blog/linux/zentyal/zentyal4-logon-script/
« Last Edit: June 21, 2015, 03:10:15 pm by guillo »