Logon Scripts

Jay Ts jay at toltec.metran.cx
Mon Nov 19 23:29:02 GMT 2001

> My WindowsME client is getting autheticated via my samba acting PDC.  It =
> says running logon scripts(and I see a black DOS looking window pop up.  =
> I think I can see it read: "Bad command or file name").

Uh huh.  Very helpful, isn't it? An error message that appears for
0.2 seconds and doesn't say anything specific! :-)

> It never maps my homes directory.

I assume you mean the home directory of the user on the Windows

> I created the batch file with a DOS editor.  It runs fine after the =
> WindowsME pc is booted up(I can double click on it). =20
> The file has one line in it:
> net use h: \\win\homes
> And the approriate DOS carraige return at the end.

Another way to check it on the Samba server is with the command

	od -c <filename>

You should see each line ending in a \r \n (which is carriage
return, linefeed).

> Why isn't my script running?

1. Make sure the file ends in .bat.  If you use .cmd, it will run
   on NT/2000/XP, but fail on 95/98/Me.  (Oh, but it looks like
   you already got that part right...)

2. To map your home directories, first put a [homes] share into
   your smb.conf, restart the server and reboot your Windows box
   to check that the share appears in Explorer. Then use this
   command in your logon script:

   	net use H: /home

3. In your command, 'net use h: \\win\homes', it is saying your
   Samba PDC's NetBIOS name is "win" ???  Even if so, I'm not sure
   it's possible to mount a [homes] share this way.  I've never tried
   it, and wouldn't expect it to work.

> There are no logs to give me any information either.  Or is there?

No, I don't think so.

Jay Ts

More information about the samba-ntdom mailing list