Koozali.org: home of the SME Server
Obsolete Releases => SME 9.x Contribs => Topic started by: lepounet on July 04, 2016, 03:00:41 PM
-
Hi all,
I have a problem with Smeserver-tw-logonscript.
SME is PDC
Logging works fine : I can see every windows login in /var/log/netlogon.log
User's home folder is well mapped even if I change the drive letter
But no other folder is mapped and the batch file is also not executed
That pb happened both with windows 7 and XP clients
Any idea where I could have a look to solve my pb.
Thanks in advance for any options or advice.
-
Hi all,
I have a problem with Smeserver-tw-logonscript.
SME is PDC
Logging works fine : I can see every windows login in /var/log/netlogon.log
User's home folder is well mapped even if I change the drive letter
But no other folder is mapped and the batch file is also not executed
That pb happened both with windows 7 and XP clients
Any idea where I could have a look to solve my pb.
Thanks in advance for any options or advice.
Hi all,
Am I the only one who have this problem ?
I used LoginScript manager successfully for years but it is no longer supported so I'm obliged with SME 9 to switch to Smeserver-tw-logonscript but it doesn't work.
I tried tu find an error in logs but don't see anything.
Thks again for your help
Alain
-
I have no idea as I have no Windows machines, but I will ask Michael who wrote the contrib to view the thread.
Rgds
John
-
thks a lot.
Alain
-
Hi Alain
John made me aware of your posting, sorry had not seen it earlier.
One member of our team wrote the package and we are using if for every installation for all Windows clients (now up to Win10) without any problem. I am actually very proud of a piece of software that came from us which seems to be so robust and easy to implement.
Not sure where to start tracing this for you but let's try a few things.
Do you have a folder /home/e-smith/files/samba/netlogon/users/? Underneath you should have a generated file for each user ie. "michael.bat" (michael being the account/logon name)
My example here looks like this:
cat /home/e-smith/files/samba/netlogon/users/michael.bat
NET USE K: \\tga1\download
NET USE O: \\tga1\tw_tmp_tech
rem Custom group and user related scripts
CALL \\tga1\netlogon\custom\shared.bat
CALL \\tga1\netlogon\custom\tech.bat
Also, can you show the first few and especially the last lines from /home/e-smith/files/samba/netlogon/netlogon.bat , ie. here it is:
@echo off
rem --- Do not modify this file, if for any reason you need to run extra commands use the custom batch files groupname.bat under the custom folder or modify the custom-template under /etc/e-smith/templates-custom/home/e-smith/files/samba/netlogon/netlogon.bat ---
rem --- general logon script at TechnologyWise for Linux/Samba PDC functionality ---
set SERVER=tga1
set LOGONDRIVE=H
... cut ...
if exist X: net use X: /del /y
if exist Y: net use Y: /del /y
call \\%SERVER%\netlogon\users\%USERNAME%.bat
rem --- Vista does not map the home drive automatically ---
IF NOT EXIST %LOGONDRIVE% NET USE %LOGONDRIVE%: \\%SERVER%\%USERNAME%
if exist Z: net use Z: /del /y
rem --- eof netlogon.bat ---
-
Hi,
I'm sure the contribution of your team is great but doesn't work for me...
My files looks ok
I have one file for each user in /home/e-smith/files/samba/netlogon/users/
Here's one of them : user1.bat
NET USE Q: \\lupin\clip^M
NET USE Z: \\lupin\commun^M
NET USE R: \\lupin\gestion^M
NET USE T: \\lupin\tolerie^M
rem Custom group and user related scripts^M
CALL \\lupin\netlogon\custom\grp_test.bat^M
And here is my /home/e-smith/files/samba/netlogon/netlogon.bat which looks good too :
@echo off
rem --- Do not modify this file, if for any reason you need to run extra commands use the custom batch files groupname.bat under the custom folder or modify the custom-template under /etc/e-smith/templates-custom/home/e-smith/files/samba/
netlogon/netlogon.bat ---
rem --- general logon script at TechnologyWise for Linux/Samba PDC functionality ---
set SERVER=lupin
set LOGONDRIVE=Y
net time \\%SERVER% /set /yes
rem --- general stuff i.e. drive mappings for all users ---
rem --- %username%.bat has been generated earlier
rem --- (see smb.conf, netlogon share, preexec statement)
rem --- to be able to assign drive mappings due to group membership
call \\%SERVER%\netlogon\users\%USERNAME%.bat
rem --- Vista does not map the home drive automatically ---
IF NOT EXIST %LOGONDRIVE% NET USE %LOGONDRIVE%: \\%SERVER%\%USERNAME%
if exist Z: net use Z: /del /y
rem --- eof netlogon.bat ---
But it still doesnt map any drive except home drive (Y in my case) which is well mapped
Any idea ?
Alain
-
By the way, I opened a dos window and typed :
call \\lupin\netlogon\users\user1.bat
Which is supposed tu be executed when windows starts and it worked : all mapped drives appears and optional commands are well executed
So the batch file is well generated and works when launched manually but is not launched at start...
Thks for any suggestion
-
Hi
I am no expert any longer in Windows client set ups and tracing Windows issues but things I suggest to try next:
From a command prompt on your Windows machine, run "net use" (to show you existing mappings)
then run the netlogon.bat manually like
\\lupin\netlogon\netlogon.bat
If this does not indicate any problem, I would add "pause" commands to the netlogon.bat file, especially before and after the line
call \\%SERVER%\netlogon\users\%USERNAME%.bat
-
it works too
drives are mapped, the problem is that \\lupin\netlogon\netlogon.bat seems not to be launched when windows starts
-
Sorry, no more ideas for tonight, on my way to bed.
You are definitely using a MS Windows PRO os version (not a HOME version)?
Your /etc/samba/smb.conf includes:
logon script = netlogon.bat ?
-
Yes of course win xp pro and win 7 pro
I tried to quit the domain for a workgroup and join the domain again but with no effect
Below is an extract from my /etc/samba/smb.conf :
log file = /var/log/samba/log.%m
logon drive = Y:
logon path =
logon script = netlogon.bat
map to guest = never
Should the logon path be empty ?
-
The logon path will be needed if you want to use Roaming user profiles - which we always enable hence we have it set like below:
logon drive = H:
logon home = \\%L\%U\._winprofile
logon path = \\%L\Profiles\%U
logon script = netlogon.bat
Please show from smb.conf:
dns proxy = no
domain logons = yes
domain master = yes
dos charset = 850
and the output of:
db configuration show smb
-
Hi,
Sorry, I was out for Bastille day. A very sad Bastille day this year.
I don't use roaming profile so...
smb.conf extract :
dns proxy = no
domain logons = yes
domain master = yes
dos charset = 850
encrypt passwords = yes
It is same as yours
db configuration show smb output :
smb=service
DeadTime=10080
KeepVersions=disabled
LogonDrive=Y
LogonScript=/home/e-smith/files/samba/netlogon/logon_script
OpLocks=enabled
OsLevel=35
RecycleBin=disabled
RoamingProfiles=no
ServerName=lupin
ServerRole=PDC
ShadowCount=10
ShadowDir=/home/e-smith/files/.shadow
UnixCharSet=UTF8
UseClientDriver=yes
Workgroup=My_Domain_Name
status=enabled
thks for help
Alain
-
Sorry, running out of ideas for the moment. As I said, we are suing it for each server installation and never had a problem. I might be too used to it to find the source of the problem.
Could you enable roaming user profiles for a moment to see whether that makes a difference?
Michael
-
hi Michael
Unfortunately the roaming profile enabled dont change anything.
The only drive which map at start is the home drive.
There is perhaps a conflict with another contrib installed on my SME :
smeserver-wbl
smeserver-sogo
smeserver-shared-folders
I just uninstalled smeserver-shared-folders but no change...
Alain
-
No, I don't expect for any of these contribs to make an impact on your issue. I believe we use all of them in different combinations without problem.
-
Hi lepounet.
I am working on a documentation for PDC and Smeserver-tw-logonscript. Quite a task.
Like you, I have logon scripts and they work well.
I do not use user standard logon scripts. I used group logon script from I-bay letters.
Maybe, you create a group and put some users in it.
Then edit the logon script for that group in I-bay letters.
Then make a line for each user:
If "%Username%"=="admin" net use W: \\name-of-my-server\Primary\html
If "%Username%"=="toto" net use W: \\name-of-my-server\Primary\files
If "%Username%"=="titi" net use P: \\name-of-my-server\partage_sme
The partage_sme is a shared folder which titi have read/write because he belongs to Domains users. I used http://wiki.contribs.org/SharedFolders/fr and I gave read/write to partage_sme to Domains users using that contrib.
All my group logon script from I-bay letters work well.
Also, note that, by default, all created users are in group shared but they are not in group Domain users. They are allowed to login to a domain station because they belong to group shared not because they belong to Domain users.
If the user don't have specific right/permissions on the folder the mapped drive won't show up.
Hope it will help,
Michel-André
-
Hi Michel-andré,
I thank you for your suggestion.
For my problem, I think I will make a fresh install of the SME server (I have to change the Hdds) and try again. I hope it will solve my problem.
I 'll let you know.
Thks to all for your suggestions.
Alain