[Samba] Re: netlogin scripts

DA Forsyth iwrtech at iwr.ru.ac.za
Thu Dec 2 12:32:27 GMT 2004

On 1 Dec 2004 , Michael Lueck entreated about
 "[Samba] Re: netlogin scripts":

> You do not get vars set in DOS with things like the server name, so
> alas it must be hard coded into LOGON.BAT. You could set an EnvVar at
> the top of the bat file and use it throughout the drive mappings.

well, you can use some free utils to fix that.  I am using 
'putinenv.exe' in my Win98 scripts to get what I need.
I use winset.exe (off the Win98 CD) to set master environment 
variables and 'setenv.exe' on W2K for the same job.

I have split my scripts into 2 sections.   one bit is loginall.bat 
that is run for everyone.  it is called from LGNusername.bat which 
then goes on to do user specific stuff.  I have not tried to 
integrate with the unix groups tha I am using, instead I keep a 
separate file with settings in it which is parsed by an AWK script to 
generate the login scripts.  this does mean that now and then I 
forget to correlate actual group members to the data file, but I plan 
to fix that sometime.  At the moment the server has been up (we 
switched from Novell last Thursday) nearly a week so I'm not changing 
too much at this point

       DA Fo rsyth            Network Supervisor
Principal Technical Officer  -- Institute for Water Research

More information about the samba mailing list