Koozali.org: home of the SME Server

Netlogon question

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
Netlogon question
« on: March 18, 2006, 01:40:37 PM »
Hi

Doesn't #ifg work anymore?

when my netlogon script runs I get errors that the command is not recognised

They used to work great in SME6.0.1-01 ... my windows machines are still the same as what ran on SME6 ... now there conected to SME7.

Any thoughts would be great.

Regards,

Tib

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
Netlogon question
« Reply #1 on: March 18, 2006, 02:44:49 PM »
Just to expand on the problem here are some errors ...

'#ifg' is not recognized as an internal or external command,
operable program or batch file.
System error 85 has occurred.
'#endif' is not recognized as an internal or external command,
operable program or batch file.

Wierd everying worked on 6.0.1-01 then when I setup my SME7 machine it doesn't work. All me shares connect but the ifg group settings are ignored.

Regards,

Tib

Offline dsemuk

  • *****
  • 269
  • +0/-0
Netlogon question
« Reply #2 on: March 18, 2006, 05:21:06 PM »
If this command worked in SME6 but not in SME7 then you are probably seeing a bug.

If it isn't a bug then sure you will be told why the command nolonger works.

Bug tracker would be best place to report it.

Dave
--
Esmith/Mitel/SME server  :-D...

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
Netlogon question
« Reply #3 on: March 19, 2006, 12:11:16 AM »
If anyone wants to know ... This isn't a bug.

The #ifg funtionality was introduced by an e-smith-loginscript contrib I installed onto SME6.0.1-01.

This contrib does not work on SME7 atm so it's not point even to try it.

Here is the bug report if ppl are interested.

http://bugs.contribs.org/show_bug.cgi?id=1087

Regards,

Tib

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Netlogon question
« Reply #4 on: March 19, 2006, 02:40:22 AM »
Quote from: "Tib"
If anyone wants to know ... This isn't a bug.

The #ifg funtionality was introduced by an e-smith-loginscript contrib I installed onto SME6.0.1-01.

This contrib does not work on SME7 atm so it's not point even to try it.

Here is the bug report if ppl are interested.

http://bugs.contribs.org/show_bug.cgi?id=1087

Regards,

Tib


Tib,

Try editing /usr/local/bin/generate_netlogon
and change line 37 from this:
tie %accounts, 'esmith::config', '/home/e-smith/accounts';
to this:
tie %accounts, 'esmith::config', '/home/e-smith/db/accounts';

JB
......

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
Netlogon question
« Reply #5 on: March 19, 2006, 04:09:42 AM »
mrjhb3

Is that after I install the contrib?

The way it is atm there is no file called generate_netlogon in that location for me.

Regards,

Tib

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Netlogon question
« Reply #6 on: March 19, 2006, 04:43:34 AM »
Quote from: "Tib"
mrjhb3

Is that after I install the contrib?

The way it is atm there is no file called generate_netlogon in that location for me.

Regards,

Tib


Yes.  I haven't tested this, so if you have a test server, i'd recommend tested it there first.

JB
......

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
Netlogon question
« Reply #7 on: March 20, 2006, 04:59:15 AM »
Thanks mrjhb3

I'll setup a test server and try this one out soon.

Will post the results in the next few days.

Regards,

Tib

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
Netlogon question
« Reply #8 on: March 23, 2006, 02:57:57 PM »
mrjhb3

I've tested this out on a test server and most seems to work now ... I have tweeked it a bit more but the comands are still not recognnised.

I'll have to check out a few more areas and see if I can see anything ... mind you I'm not much good with scripts etc but maybe I'll fing something.

These are the files I had to modify ...

etc/e-smith/events/actions/conf-loginscript
Line 33: esmith::util::processTemplate (\%conf, "/home/netlogon/netlogon.bat");
change to: esmith::util::processTemplate (\%conf, "/home/e-smith/files/samba/netlogon/netlogon.bat");

etc/e-smith/events/conf-logondrive/S75conf-loginscript
Line 33: esmith::util::processTemplate (\%conf, "/home/netlogon/netlogon.bat");
change to: esmith::util::processTemplate (\%conf, "/home/e-smith/files/samba/netlogon/netlogon.bat");

etc/e-smith/templates/etc/smb.conf/50homes-preexec
Line 1: root preexec = "/usr/local/bin/generate_netlogon /home/netlogon/netlogon.template /home/e-smith/files/users/%U/home/netlogon.bat %U %m %a %T"
change to: root preexec = "/usr/local/bin/generate_netlogon /home/e-smith/files/samba/netlogon/netlogon.template /home/e-smith/files/users/%U/home/netlogon.bat %U %m %a %T"

etc/e-smith/web/functions/loginscript
Line 94: if ( -e '/home/netlogon/netlogon.template' )
change to: if ( -e '/home/e-smith/files/samba/netlogon/netlogon.template' )
Line 96: open ( NETLOGON, '< /home/netlogon/netlogon.template' )
change to: open ( NETLOGON, '< /home/e-smith/files/samba/netlogon/netlogon.template' )
Line 97: || die 'Couldn\'t open /home/netlogon/netlogon.template file!';
change to: || die 'Couldn\'t open /home/e-smith/files/samba/netlogon/netlogon.template file!';
Line 229: open ( NETLOGON, '> /home/netlogon/netlogon.template' )
change to: open ( NETLOGON, '> /home/e-smith/files/samba/netlogon/netlogon.template' )
Line 230: || die 'Couldn\'t open /home/e-smith/files/samba/netlogon/netlogon.template file!';

etc/e-smith/web/panels/manager/cgi-bin/loginscript
Check all relevant lines here as well should be the same as above.

usr/local/bin/generate_netlogon
Line 37: tie %accounts, 'esmith::config', '/home/e-smith/accounts';
change to: tie %accounts, 'esmith::config', '/home/e-smith/db/accounts';

Thats all I could find at a glance.

I also tried things by changing all the netlogon.template to netlogon.bat because with the template file it didn't seem to do much. After the change I can modify the netlogon.bat through the web interface no prob and it copies a vertion of the bat file to the persons home dir with only the shares that are available to them.

So most things seem to work but the #ifg and #endifg is still not recognised.

Regards,

Tib

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Netlogon question
« Reply #9 on: March 24, 2006, 02:55:11 AM »
I'm just bumping this as I never got an e-mail that you updated this thread.  Looks like there is more to look at.  I want to use this rpm on 7.x as well, but don't have the time right now to dig in and see how this works.

JB
......

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
Netlogon question
« Reply #10 on: March 26, 2006, 07:37:41 AM »
Well I've looked and looked but I'm not experienced enough to work this out ... I'm not much into scripts etc.

And I'm still learning more and more about linux so someone else might have to have a look at this.

From time to time I will have a look again but unless I work out how it all works I don't think I will be able to do it.

Regards,

Tib

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
Netlogon question
« Reply #11 on: March 30, 2006, 01:50:19 PM »
Hi

I had a look over all this again and may have found something else.

In the "/etc/e-smith/events/conf-logondrive" section there are two files ... S25conf-samba and S50reload-samba ... they seem to be links ... they have red squares in the bottom left corner which if I'm right mean there broken as when I try to edit or open them I get an error "cannot open remote file '/etc/e-smith/events/conf-logondrive/S25conf-samba'."

I found they are supposed to link to a file in "/etc/e-smith/events/conf-samba" and "/etc/e-smith/events/reload-samba"

These 2 files are missing.

I'm not sure if this has anything to do with it but maybe someone can have a look.

Regards,

Tib.

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
Netlogon question
« Reply #12 on: March 30, 2006, 03:56:50 PM »
Ok ... it's midnight and time to stop

I have it working but not sure if it's the right way to do it.

I copied the missing files accross form an SME6 server check the files and copied them to the locations.

Aslo I was missing a few things in the netlogon.bat file to point the logon script to the peoples home drive.

I'f someone with a bit more nouse then me would like to check all this over and re package it for others to use let me know.

I still don't think it is 100% but it's working for me as it is.

Regards,

Tib

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Netlogon question
« Reply #13 on: May 09, 2006, 06:03:27 AM »
Quote from: "Tib"
Ok ... it's midnight and time to stop

I have it working but not sure if it's the right way to do it.

I copied the missing files accross form an SME6 server check the files and copied them to the locations.

Aslo I was missing a few things in the netlogon.bat file to point the logon script to the peoples home drive.

I'f someone with a bit more nouse then me would like to check all this over and re package it for others to use let me know.

I still don't think it is 100% but it's working for me as it is.

Regards,

Tib


Tib,

IMO, you did great :pint:!  I was able to follow what you did and make some additional changes and get this repackaged.  I think I got it all right.  I did some minimal testing and it looks good.  Those two events you say you don't have any more, they are not needed as the services2adjust and templates2expand functions take their place.  Now, I am not guru at this, but I have been able to pretty much follow what is going on.  I have repacked this as e-smith-loginscript-0.2-6.noarch.rpm.  This will be in my contribs area at http://mirror.contribs.org/smeserver/contribs/jbennett/sme7/loginscript as soon as the mirrors sync.  If you have a test server and can do more testing, I'd appreciate it and the feedback.  If it all looks good, then I plan on re-packaging it again as smeserver-loginscript and will send it all back to the original author of the rpm to see if he wants to maintain it.  I really don't.

JB
......

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
Netlogon question
« Reply #14 on: May 09, 2006, 02:20:21 PM »
mrjhb3

Thats great ... I din't have time to figure out how to package rpm's .... and I wasn't sure on those 2 files.

I will re-load my test server and try your repackaged ver out through the week.

I was hoping someone would take interest in this as I think it is a very handy add on and a lot of ppl who run SME as a logon server would use this to only connect drives that ppl belong to.

This contrib puts the SME server in parallel with microsoft servers with the way it only connects drives that you belong to and not the whole lot..

Regards,

Tib