Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: ansentry on August 10, 2004, 01:05:16 PM
-
I am using 6.0.1-01 0 custom
I am using the following logon script (below) , but am having problems with users who may may be a member of a group. When I was using 5.6 I could use ifg (If member of group) but it does not work with 6.0. When my script get to a mapped drive eg net use W: \\sme6\archive and the user is not a member of that group is asked "Enter the user name for 'SME6':" , if I enter the user name it then asks for the password if you put that in it will close. If the user does nothing the script window sits on the taskbar. 2nd problem is that is does not happen every time the user logs in , every now and then it will just run and close.
======================================================
REM----> THIS DISCONNECTS ALL DRIVES
if exist H: net use H: /delete /yes
if exist Z: net use Z: /delete /yes
if exist P: net use P: /delete /yes
if exist I: net use I: /delete /yes
if exist M: net use M: /delete /yes
if exist Y: net use Y: /delete /yes
if exist T: net use T: /delete /yes
if exist W: net use W: /delete /yes
REM -----> To set the time when users logon to the domain
net time \\SME6 /set /yes
REM -----> Connects to these Non Grouped drive
net use H: /home
net use P: \\SME6\public_sh
REM -----> Connects user to drives they are grouped to
net use I: \\SME6\install_sh
net use M: \\SME6\myob_sh
net use Y: \\SME6\access_be
==================================================
I have searched the site but cannot find anything regarding this problem.
I hope that someone out there is running netlogon.bat successfully
Any ideas would be appreciated.
-
Sorry to be a pain, but does anyone use a logon script that works with groups?
I have searched the net for hour’s to-day and found nothing.
I just ready need to have this working.
Sorry for being impatient
:-(
-
i searched for netlogon.bat here as you did and got some 60 results. Maybe you should revise the results from here? Otherwise i don't have an idea. Sorry.
-
mbachmann,
Thank you for your reply, I have read all those but they do not address my problem.
My script runs fine, it works on win98, win2k and XP the problem is with members of groups. If a user have a tick to all my groups then they are connected without a problem to all their drives. The problem is the users who do not have permission to connect to selected ibays (not user of a group)
What I need is to be able to use something like "IF" but cannot find any help on the matter.
Thanks again.
-
What I need is to be able to use something like "IF" but cannot find any help on the matter.
Have a look at Kixtart, you can find it at http://www.kixtart.org. It's is a logon script processor for use with windows during logon. It should work in combination with Samba/SME.
ricrjhl.
-
Are your netlogon.bat's generated at logon by /usr/local/bin/generate_netlogon ?
-
I'm tempted to bite on the generate_netlogon;
but search google for ;
ifmember site:microsoft.com
ifmember reports what groups a user is a member of works with w2k and xp, assume nt, don't think win9x though
-
ifmember is a part of the "Windows Resource kit" that you have to buy!
But I would recomment Kixtart !
/Mats
-
Sorry have been missing for a couple of day, and have just read the replies.15th +
pkidd:
The login script (above) I have in /home/e-smith/files/samba/netlogin. If I go to /usr/local/bin there is no generate_netlogon, what is this? Thank you for your reply.
davidbray:
Thanks for your reply.
Matsk:
Thank you for your reply, I downloaded kixtart am just starting to read the help doc.With kixtart how do I associate my netlogon.bat to the kixtart.exe?
Any help would be appreciated, I am surprised how little there is about this problem (groups in nelogon) on this site.
:-)
-
To install KiXtart on the network, copy kix32.exe and wkix32.exe files to the NETLOGON share of the logonserver(s).
Create netlogon.bat with the content:
START /w WKIX32.EXE logon.kix
or
KIX32.EXE logon.kix
and copy it to your NETLOGON share.
/d sets the kix into debug mode
Then you create the logon.kix and copy it to the NETLOGON share, it's a plain text file.
The command/function we are going to use is :
use and InGroup and SetTime
Example :
;****************
; Sync the time
;*****************
SetTime "\\SME6"
;****************
; Delete any old drive shares
;*****************
use * /delete
;****************
; Connect common shares
;*****************
use H: /home
use P: \\SME6\public_sh
;****************
; If in group then
;*****************
if ingroup(administrators)
use O: \\SME6\Admin_sh
endif
if ingroup(install)
use I: \\SME6\install_sh
endif
And read the http://www.kixtart.org/bin/KIX2001.doc
Is this what you where looking for?
This is for WinNT/2K/XP for Win9X you have to install some dll's but that is covered in the manual (Word version, the chm file is a reference guid !).
/Mats
-
ifmember is a part of the "Windows Resource kit" that you have to buy!
/Mats
Some parts of the resource kit are available for free download;
http://www.microsoft.com/windows2000/techinfo/reskit/tools/new/ifmember-o.asp
-
Matsk
I copied both KIX32.exe and WKix32.exe to /home/e-smth/files/samba/netlogin.
Then made my netlogon.bat read START /w WKIX32.EXE login.kix
I then created a text file and called it login.kix (with comments)
Below is what I put in my login.kix
SetTime "\\SME6" ;Works
USE * / DELETE ;Does not Work
USE T: /DEL ;Does not Work
USE P: \\SME6\PUBLIC_SH ; Works
USE Z: /DEL ;Works
USE H: @HOMESHR ;Works
IF INGROUP(archivegp);Does not Work
USE T: \\SME6\archive
ENDIF
I made no changes to the client (users Win XP Pro PC)
I changed use H: /home to USE H: @HOMESHR and it is working fine. I had to use Z: /DEL as XP connects Z as the home directory. I know that you can change this but this is easier if you have lot of client pc's
If you can see what I am doing wrong, please advise. I am now going to have a look at the kioxtart forum.
davidbray
I have downloaded the file you suggested and will hold in in reserve in case I can’t get kixtart to work for me.
Thank you both
:-) :-)
-
matsk,
Since my last post, I have tried different scripts, but a very funny thing has happened. I have 2 PC's here at home 1 running XP Pro and the other win2K, both login to the SME Server. I have 4 different users so that I can test the logins etc. I install the following script and called it login.kix (you will see some of your script in there), as you can see it has NO IFGROUP, but it works. First user "johna" should be able to connect to all 7 and it does. "test" should connect to H & P and 3 others and it does. "homepc2" should connect to H & P and 3 others (different to test) and it does. etc etc. I have tested each login three time on each machine and not 1 mistake. If I connect as john I get the 7 mapped, log off and log on as test and I get five the other 2 have disconnected. I have no idea why it is working. One thing on the XP machine 2 of the users are roaming profile and 1 local.
Now I will have to try and work out why this is happening. below copy of login.kix
;****************
; Sync the time
;*****************
SetTime "\\SME6"
;****************
; Delete any old drive shares
;*****************
use * /delete
;****************
; Connect common shares
;*****************
USE Z: /DEL ;this is windows default for home
USE H: @HOMESHR ;connects to sme6 home directory
USE P: \\SME6\PUBLIC_SH
USE I: \\SME6\INSTALL_SH
USE M: \\SME6\MYOB_SH
USE W: \\SME6\EMPLOYKITS
USE T: \\SME6\TEMPLATES_SH
USE y: \\SME6\ACCESS_BE
Thank you again for your help and interest, any suggestion would be appreciated.
:-)