Koozali.org: home of the SME Server

Windows 7 netlogonbat not running when user logs in

Offline ansentry

  • ***
  • 118
  • +0/-0
Windows 7 netlogonbat not running when user logs in
« on: December 17, 2015, 01:48:27 PM »
Running sme9
Users are currently using XP Pro, SME9 has this installed "smeserver-loginscript-0.2-8.noarch.rpm"  Login script manager is setup and working fine, using ibays & groups

PROBLEM 1
I am now installing Windows 7 on newer PCs for the users, have installed the two reg patches: https://your-server-ip/server-resources/regedit/ &
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths] "\\\\*\\netlogon"="RequireMutualAuthentication=0,RequireIntegrity=0,RequirePrivacy=0"

I have checked the registry and they have installed correctly.

I can joined the domain OK ,user can login OK , but there is no mapping to home drive (H:) nor does my Windows login script run from the SME Server.


PROBLEM 2
As a work round I have created a folder on the C:\Ansenty and in it I have put a .bat file:

Code: [Select]
net use H: \\sme55\%username%
CALL H:\netlogon.bat

Them in the registry is put the following under "RUN"

Code: [Select]
"SMEDrives"="C:\Ansentry\HomeDrive.cmd"
I have tested it on several users (who have access to different ibays & groups) and it appears to be working fine.

My questions are:

(a) How do I fix my first problem 1

(b) Can anyone see any problems with problem 2

Thanks in advance for any options or advice.

PS Is there an easy way to move all the data from old samba profile to new .v2 (Just want to copy documents, pictures, desktop etc not any app data.
« Last Edit: December 17, 2015, 01:52:16 PM by ansentry »
Regards,

John A

Offline brianr

  • *
  • 988
  • +2/-0
Re: Windows 7 netlogonbat not running when user logs in
« Reply #1 on: December 17, 2015, 02:14:20 PM »
I have a set of Win7 Pcs logging onto the domain, and the netlogon works as far as I can see.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

guest22

Re: Windows 7 netlogonbat not running when user logs in
« Reply #2 on: December 17, 2015, 02:42:40 PM »

Offline ansentry

  • ***
  • 118
  • +0/-0
Re: Windows 7 netlogonbat not running when user logs in
« Reply #3 on: December 17, 2015, 08:34:10 PM »
Thank you both for your replies.

RequestedDeletion, I did use this (http://wiki.contribs.org/Windows_7_Support) I added both the reg entries I did not edit my netlogon.

Code: [Select]
@REM #------------------------------------------------------------
@REM # DO NOT MODIFY THIS FILE! It is updated automatically by the
@REM # e-smith server and gateway software. Instead, modify the source
@REM # template in the /etc/e-smith/templates-custom directory. For more
@REM # information, see http://www.e-smith.org.
@REM #------------------------------------------------------------
@ECHO OFF

REM ******************************************************
REM ** Mapping a drive to the home folder triggers the  **
REM ** generation of the login script.  Windows NT/2K   **
REM ** does this automatically but we need to map the   **
REM ** drive manually for the others.                   **
REM ******************************************************

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


REM Call the generated login script from the user's home folder:

CALL h:\netlogon.bat

@REM #------------------------------------------------------------
@REM # TEMPLATE END
@REM #------------------------------------------------------------

The netlogon.bat is not working. When I create the home drive (H:) with my script it call the netlogon.bat and works fine.

brianr, did you do anything different to me?
Regards,

John A

Offline brianr

  • *
  • 988
  • +2/-0
Re: Windows 7 netlogonbat not running when user logs in
« Reply #4 on: December 17, 2015, 10:07:07 PM »
brianr, did you do anything different to me?

I used the netlogon contrib to configure the bat file:

http://wiki.contribs.org/Smeserver-tw-logonscript
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline ansentry

  • ***
  • 118
  • +0/-0
Re: Windows 7 netlogonbat not running when user logs in
« Reply #5 on: December 17, 2015, 10:37:25 PM »
Brian,

Thanks for your reply.
 I have use this"smeserver-loginscript-0.2-8.noarch.rpm" it works fine after my script runs from the registry and create the H drive for the user. The problem appears to be that my netlogin.bat script is not running or not running correctly as it does not create H drive for home and then run
Code: [Select]
CALL h:\netlogon.bat
Code: [Select]
IF "%OS%"=="Windows_NT" GOTO :SkipHomeMapping
NET USE h: /home
:SkipHomeMapping


REM Call the generated login script from the user's home folder:

CALL h:\netlogon.bat

I have put this code in a folder and it is run from the registry:

Code: [Select]
net use H: \\sme55\%username%

CALL H:\netlogon.bat

This works fine so my "smeserver-loginscript-0.2-8.noarch.rpm" is working OK the "If group etc" is working fine.

Also it there an easy way to copy samba profile data from old to newer v2?
Regards,

John A

Offline ReetP

  • *
  • 3,740
  • +5/-0
Re: Windows 7 netlogonbat not running when user logs in
« Reply #6 on: December 18, 2015, 01:50:46 AM »
I have use this"smeserver-loginscript-0.2-8.noarch.rpm" it works fine after my script runs from the registry and create the H drive for the user. The problem appears to be that my netlogin.bat script is not running or not running correctly as it does not create H drive for home and then run

This works fine so my "smeserver-loginscript-0.2-8.noarch.rpm" is working OK the "If group etc" is working fine.

Clearly it isn't working fine or you would not be asking questions and having issues :-)

Note that the rpm you are using is for SME v7 and neither the OS or the contrib are supported.

You really ought to remove it and use the contrib that Brianr suggested from the contribs repository : http://wiki.contribs.org/Smeserver-tw-logonscript

If you still have issues then you can open a bug against the contrib, but note you won't get any help with an unsupported rpm.....

Quote
Also it there an easy way to copy samba profile data from old to newer v2?

Are you referring to the Samba version ? v9 is on Samba 3.6.23

What profile data are you actually referring to ?

B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ansentry

  • ***
  • 118
  • +0/-0
Re: Windows 7 netlogonbat not running when user logs in
« Reply #7 on: December 18, 2015, 11:13:58 AM »
John,

Thanks for your reply, I removed the current rpm (smeserver-loginscript-0.2-8.noarch.rpm) and installed  the one Brian suggested and it is now working fine with windows 7 - Windows 10 is next.

Quote
What profile data are you actually referring to ?
In samba profiles you have the users listed;

eg.
johna
johna.v2
johna.v3
johna.v4
johna.v5

XP johna
win7 uses johna.v2
win10 use johna.v3
Hope I'm correct about this

johna was a xp user and his profile data was in johna, now he has upgraded to win7 so anything that is save to his profile will go to johna.v2

How do I get the old data from johna to johna.v2

Hope I have made this clear. I know that I can copy the data from my documents etc to external hdd and then back into the correct folder under win7 and then it will be save in johna.v2
I just though there maybe another way.

One last question, I note that with Win7 you have to reg edits to run however with win10 you only have "Win7saba"

Thank again for your advice - it worked.
Regards,

John A

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Windows 7 netlogonbat not running when user logs in
« Reply #8 on: December 18, 2015, 12:57:23 PM »
johna was a xp user and his profile data was in johna, now he has upgraded to win7 so anything that is save to his profile will go to johna.v2

How do I get the old data from johna to johna.v2


Hi ansentry..

unfortunately this is more a windows' related question than a SME's one..

searching with google for "windows roaming profile migrate from xp to windows7" gives me dozens of result, so you're not the only one :-)

I don't use roaming profiles at all so can't help you more, but if I were in your shoes, I'd try to take a look at some of the results above.. :-)

in any case, if you find how to to it in the right (i.e. without getting crazy) way to do it, let us know, thank you :-)