Koozali.org: home of the SME Server

SMB loginscripts dosn't work

Jens K. Hansen

SMB loginscripts dosn't work
« on: October 15, 2002, 12:04:55 AM »
I had to rebuild my e-smith 5.5 server. Now I can't get  the Samba loginscripts to work. My users do get the scripts (netlogon.bat) i their home dirs but the scripts dosn't get executed during login.

The directory /home/netlogon dir contains 2 files:
netlogon.bat with
@ECHO OFF
.......
IF "%OS%"=="Windows_NT" GOTO :SkipHomeMapping
NET USE f: /home
:SkipHomeMapping
......
REM Call the generated login script from the user's home folder:

CALL f:\netlogon.bat

And a netlogon.template containing the login script entered through the loginscript rpm. It is the same script that is copied to the users home dirs.

Unfortunately I can't remember what I did last time i installed. Can anybody help me.

Bill Talcott

Re: SMB loginscripts dosn't work
« Reply #1 on: October 15, 2002, 12:22:25 AM »
What problem are you having exactly?

> IF "%OS%"=="Windows_NT" GOTO :SkipHomeMapping
> NET USE f: /home
> :SkipHomeMapping

This will make NT machines skip mapping the F: drive. You have to have that persistently mapped on the client then...

> NET USE f: /home

"NET USE f: /home" is the wrong syntax. You need to use the server and share name from Windows machines. Something like "NET USE f: \smeserver\home" is what you need. I realize the "NET USE f: /home" is skipped for NT machines in that script, but Win9x machines will try to do this.

> CALL f:\netlogon.bat

Again, if F: isn't mapped properly before this, this obviously won't work.

It could be a few things, but I think the "NET USE f: /home" is most likely what's causing the problem.  Changing /home to \server\share should fix that...

Jens K. Hansen

Re: SMB loginscripts dosn't work
« Reply #2 on: October 15, 2002, 01:12:34 AM »
My problem is that my users don't get the mappings in the netlogon.bat in their home dirs.

The whole thing is generalted by the loginscrip rpm that i downloaded. It is a menu point i the server-manager.  All the users workstations is win2k's.

In my previous installation it just worked ok and now I don't know why it dosn't work. In the netlogin.bat in /home/netlogon it says that it is a template file and that I shouldn't modify it. In stead I should use the login script piont in the server-manager
/jens

Stephan Burmeister

Re: SMB loginscripts dosn't work
« Reply #3 on: October 15, 2002, 01:38:07 AM »
Did you have the W2K workstations rejoin the domain? If not, there won't be any machine accounts for your W2K's on the new server and therefore the logon scripts won't work.

Regards,
Stephan

Kelvin

Re: SMB loginscripts dosn't work
« Reply #4 on: October 15, 2002, 02:25:19 AM »
Just to quickly check, you did remember to set your server back as a Domain server, not just as a workgroup server, right ?

Kelvin

Jens K. Hansen

Re: SMB loginscripts dosn't work
« Reply #5 on: October 15, 2002, 03:48:13 AM »
I have just tried to take the computer out of the domain and make it a member of the dimain again - It did the job.
Thanks a lot
/jens