Koozali.org: home of the SME Server
Contribs.org Forums => General Discussion => Topic started by: scottieg99 on April 15, 2013, 02:42:59 AM
-
Hi Guys.
I have recently setup a SMEServer 8. I have applied the reg patch and got my windows 7 PC attached to the domain. I have created some groups and also installed the logon script manager. Heres a portion of the code:
#ifg admins
REM Map iBay's for admin group:
NET USE P: \\sstone\accounting
NET USE O: \\sstone\archive
NET USE F: \\sstone\columbarium
NET USE G: \\sstone\general
NET USE I: \\sstone\laser
NET USE J: \\sstone\monumental
NET USE K: \\sstone\production
NET USE R: \\sstone\resources
NET USE L: \\sstone\scans
NET USE M: \\sstone\software
#endif
#ifg artists
REM Map iBay's for artists group:
NET USE O: \\sstone\archive
NET USE F: \\sstone\columbarium
NET USE G: \\sstone\general
NET USE I: \\sstone\laser
NET USE K: \\sstone\production
NET USE R: \\sstone\resources
NET USE L: \\sstone\scans
NET USE M: \\sstone\software
#endif
#ifg powerusers
REM Map iBay's for powerusers group:
NET USE O: \\sstone\archive
NET USE F: \\sstone\columbarium
NET USE G: \\sstone\general
NET USE I: \\sstone\laser
NET USE J: \\sstone\monumental
NET USE K: \\sstone\production
NET USE R: \\sstone\resources
NET USE L: \\sstone\scans
NET USE M: \\sstone\software
#endif
So if "UserA" that is part of the Admin group logs on it should map all of the drives, however it is not. I have to manually mount the home drive for the user, then in that home drive is as netlogon.bat file which I then double click and it mounts the other drives for me. This is a fine solution however I am worried that the drives might not persist after reboots or what not.
Is there something I am doing wrong? I want to make it pretty simple for the users so that when I create a new user - based on the group their in it will map the appropriate drives.
Thanks
-
scottieg99
add in
NET USE H: /home
after the above you may also want to add
NET USE /delete Z: /yes
-
Just tried what you suggested and it doesn't appear to be working.
None of the drives are mapping - not even the H:\ drive which should be mapping by default.
Im wondering if something is causing this to mess up?
-
Are there any existing mapping (left over from manually setup ones)? If so you need to delete (disconnect) them otherwise I don't think NET USE will overwrite.
I use this technique all the time, and it does work.
-
There were some manual ones I setup for testing but I did disconnect them. Also for testing purposes I created a brand new user in the same group I am testing and no drives are mapping to this brand new user
-
Have you tried manually applying the NET USE commands from the command line when logged in as the user, to see if they work then?
-
Yes that works fine - weirdly enough. However I want to make it as easy as possible for the users and have a login script to manually map the drives. I could technically put a batch file in the startup folder, but it wouldn't help associate the groupings that the user is in and map the drives accordingly. Is there another way?
-
Are you sure it is not your "if" commands that are messing things up then? Can't say I really understand what it is you are doing there. Where do those groupnames come from?
-
Let me explain:
I downloaded a "plugin" i guess you could call that essentially adds a box that allows you to apply login scripts for any and all users. They give you a template that you can follow and has stuff like #ifg (if group) #ifu (if user) etc that basically allow you to specifiy different mappings based on the group people are in.
So I have a login script that goes #ifg admins net use P: \\server\accounting
#endif
so that only if the user is in the admins group it will map the accounting drive. It looked pretty good but I have yet to set it up and I too am wondering if its becasue the command #ifg is not recognized.
If that is the case and its not recognized how do you currently map different network drives for different users based on groups?
-
scottieg99
I downloaded a "plugin"
Is it this ?
http://wiki.contribs.org/Smeserver-tw-logonscript
I am using the earlier smeserver-loginscript contrib on sme7.6 & it works OK with Win 2K, XP & Vista.
I wonder if your problem is Win7 related, or a setting in Win7.
Can you try logging in with a XP or Vista PC.
-
If that is the case and its not recognized how do you currently map different network drives for different users based on groups?
I don't - have never used that facility.
Sounds as if the contrib is not working the way you expect!
-
If your netlogon.bat tries to map the drives every time they logon, then you should release the drive when they logoff.
eg
NET USE P: \\sstone\accounting /persistent:no
The /persistent:no means the drive is released (ie unmapped or disconnected) when the user logs off.
Hope you get it working.
Cheers
Ian
-
ok so I just attached a windows xp pro bot to the domain and logged in with the same user and the drives mapped! Could this be a windows 7 thing?
-
scottieg99
[quoter]Could this be a windows 7 thing?
[/quote]
Possibly so.
Do some googling, as I do not have specific experience
Perhaps your Win7 is configured incorrectly.
Do you have other Win 7 machines logging in OK & mapping drives ?
Have you successfully used Windows 7 in the same way before ?
Refer to a bug report in bugzilla about Windows 8 {yes I mean Win 8} joining sme server domains. There was mention of registry settings applicable to both Windows 7 & 8 workstations. I do not know if those may be applicable to your situation.
-
Worst thing is this is a fresh Windows 7 pro Iso on a VM that I just loaded up. Could it have anything to do with not being activated or some sort of trust relationship by default enabled in Windows 7?
-
scottieg99
I am purely guessing, or giving my reasoned "hunch'.
More likely it is to do with your VM configuration, as many unusual issues seem to be related to "incorrect" VM setup, possibly network card related.
You could try sme7 on a real box & see if it works OK, as far as I know sme 7 does work OK. I'll have to test my copy, but that is on a standalone machine which I have not yet connected to a sme domain.
I'm sure someone else can confirm & comment.
-
My SME8 server is on a physical box, but my Win7 client is VM. I have it bridged to my network connection and the windows 7 box does not pick up the drives however the XP does.
-
One thing I wanted to add was that the logon script I tried to run was:
http://www.theforcefield.net/forums/index.php?topic=2416.0
because this one was not working:
http://wiki.contribs.org/Smeserver-tw-logonscript
Could that have anything to do with it? When I do a
yum --enablerepo=smecontribs install smeserver-tw-logonscript
signal-event workgroup-update
nothing works so I am wondering if I need to do a:
wget smeserver-tw-logonscript-1.3-15.el4.sme.noarch then do a yum install. Sorry I am not too familar with Linux
--------------------
Might I add: I just spun up a new SMESERVER 8 and tested the whole thing again with the logon script and its not mapping the home drive or the accounting drive. I think the issue has to do with this login script manager and maybe its an older version. Can anyone assist in getting a newer version working? Am I doing the command wrong?
-
Well worth a read HERE (http://forums.contribs.org/index.php/topic,49229.msg245652.html#msg245652)
-
My SME8 server is on a physical box, but my Win7 client is VM. I have it bridged to my network connection and the windows 7 box does not pick up the drives however the XP does.
Are you sure your VM Network connection is "bridged" not "NATed", if the latter, then the WIn7 will get an Ip address not on the same subnet as the SMEServer.
Check the Ip address of the Win7 VM (ipconfig at command level).
-
Just verified:
Windows 7 - Bridged
IP is on same subnet
Windows XP - Bridged
IP is on same subnet
XP works
Windows 7 isnt (Home drive nor accounting drive)
-
Just verified:
Windows 7 - Bridged
IP is on same subnet
Windows XP - Bridged
IP is on same subnet
XP works
Windows 7 isnt (Home drive nor accounting drive)
Well, I'm out of ideas, except to say that it looks like a Win7 problem (all my systems are still on XP). Perhaps the script is run too early in the login procedure and the network is not properly established at that point.
-
Did you try the Windows 7 registry tweak on the Windows 8 system?
See Here (http://bugs.contribs.org/show_bug.cgi?id=7172)
-
Actually that registry tweak is a mandatory addition should you want a windows 7 client to connect to the domain. Yes I did apply that in the beginning as well I was successfully able to attach to the domain.
At this point I am thinking about starting fresh and mapping all drives for all users. Then based on group access only the appropriate users will be able to access some drives. I realize its not the best solution but it will have to do. My go live is Monday!
Thanks for all your help.