Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: Tue Arnkil on September 16, 2001, 03:05:32 AM

Title: logon.bat
Post by: Tue Arnkil on September 16, 2001, 03:05:32 AM
I want to run a program on the win98-client while logging in.
I have placed the program (kix32.exe) in the /home/netlogon/ -share along with the netlogon.bat.
How can I call kix32 from netlogon.bat ?

I have tried these lines (one at the time, of course) in netlogon.bat:

//e-smith-server/netlogon/kix32

//e-smith-server/home/netlogon/kix32

//%L/netlogon/kix32

//%P/kix32

%0/../kix32

None of them works.
It must be possible to solve this (?)
The program runs on the client, but is saved on the server.
Title: Re: logon.bat
Post by: Des Dougan on September 16, 2001, 04:51:37 AM
Tue,

The NETLOGON share is accessible as drive Z:.

Des
Title: Re: logon.bat
Post by: david on September 16, 2001, 06:19:39 AM
Make sure you are editing the netlogon on a windows box.
It often screws if you edit in unix editor or in MC.
Title: Re: logon.bat
Post by: Michael Doerner on September 16, 2001, 02:01:07 PM
Assuming your server's name really is 'e-smith-server' (?), the following syntax should work:

\e-smith-server\netlogon\kix32

Regards,
Michael
Title: Re: logon.bat
Post by: Ronald Tanis on September 18, 2001, 12:21:39 AM
How can i start a  netlogon.bat ?

with regards,
rmt
Title: Re: logon.bat
Post by: Gene Cooper on September 20, 2001, 11:28:22 PM
Though I wish I knew more about advanced logon script processing in the Windows environment (sometimes I miss Netware), here are a few notes that may help.  Man, stock Windows logon scripting sucks!  

To access the netlogon share, bring up a DOS prompt and:

net use L: \servername\netlogon

You gan then access/create the netlogon.bat file from Windows as drive L:.

Remember, your syntax is \servername\sharename.
================================
Logon Scripts

Create a netlogon.bat file that will map network resources for all users:
A simple netlogon.bat file:

net use p: \tucsvr\public
rem net use h: \tucsvr\%USERNAME%
net use H: /HOME
net time \tucsvr /set /yes
\tucsvr\public\pccsrv\autopcc  

A different netlogon.bat file:

net time \linus /set /y
net use f: \linus\public /persistent:no
net use i: \linus\cdrom /persistent:no
net use j: \sonora_nt\c_drive /persistent:no
net use lpt1: \linus\cpw /persistent:no
net use lpt2: \linus\dot /persistent:no
net use lpt3: \linus\oki /persistent:no


The ‘/persistent:no’ is for NT/2000 clients.

Place this file in the /home/e-smith/files/netlogon folder.  

Note about line endings:

If you use vi to create the logon.bat file, it is VERY important to use DOS-style line endings as UNIX editors do not automatically add the carriage-return character REQUIRED by the Windows logon script processor.

Example:

In vi, at the end of the line, hit ctrl-v then ctrl-m.  This should insert the desired carriage return to the end of the line.

Alternately, sometime during the editing session, set the file format to DOS mode by typing ESC to get to command mode, then ‘:set fileformat=dos’ then ‘:w’ to write the new format to disk.
Title: Re: logon.bat
Post by: steve on September 23, 2001, 12:41:08 AM
"rem net use h: \tucsvr\%USERNAME%"

This line does not work.  Do I need to substitute  %USERNAME% with the actual username?  If that is true, then how do I create seperate drive maps for each user?

I just want to map a drive to a users home directory

thanks
Title: Re: logon.bat
Post by: steve on September 23, 2001, 12:43:05 AM
i of course took out the rem...... typo on previous post
Title: Re: logon.bat
Post by: Des Dougan on September 23, 2001, 12:53:04 AM
Are you using the correct filename and share for this? The file is netlogon.bat and is found in //servername/netlogon (this is a hidden share, so if you aren't using it, just type the name into the "Map network drive" option in Windows Explorer). You must be logged on to the domain as admin to have write access to the share.


Des Dougan
Title: Re: logon.bat
Post by: Gene Cooper on September 23, 2001, 12:59:47 AM
steve wrote:
>
> "rem net use h: \tucsvr\%USERNAME%"
>
> This line does not work.  Do I need to substitute  %USERNAME%
> with the actual username?  If that is true, then how do I
> create seperate drive maps for each user?
>
> I just want to map a drive to a users home directory

Did the other line (that wasn't rem'd out) work OK?

I think that variable only works for NT/2000.  Windows NT and 2000 have much better logon script processing than 95/98.  Unfortunately, the MS web site isn't much help either.

I'd personally appreciate a good reference for knowledge on MS logon scripting.

See: http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q100843
for NT/2000 info.

G
Title: Re: logon.bat
Post by: Gene Cooper on September 23, 2001, 01:10:15 AM
See also:
http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q106102

G
Title: Re: logon.bat
Post by: Ronald Tanis on September 25, 2001, 01:30:34 AM
I know how it works , netlogon, but is it also possible that when a user logon on his windows machine, he gets his own logon script, so don't have to configurate his machine,

Thanks,
rmt
Title: Re: logon.bat
Post by: Gene Cooper on September 25, 2001, 09:44:41 PM
Easily.  You'll want to use the templates-custom method to modify the smb.conf file (see the E-Smith HOWTO) then create logon scripts for your users.

http://us6.samba.org/samba/docs/man/smb.conf.5.html#LOGONSCRIPT

Personally, after using the far-more-powerful Netware login scripts for years, I dislike the idea of individual logon scripts (and maintaining them...ask anyone managing Windows NT SBS).

Good Luck,

G
Title: Re: logon.bat
Post by: Allen Rapini on October 13, 2001, 06:22:19 AM
Gene I agree, Netware may eventually "drop off the radar" but with all the copying M$ does, they never achieved the simple elegance of groups under anything BUT nt...