?
Solved

Scripting problem ifmember

Posted on 2005-05-16
5
Medium Priority
?
367 Views
Last Modified: 2008-02-26
I created global group test_global and populated it with administrator user, than i created local group test_local and I populated this group with test_global. Ifmember.exe is in netlogon share.
I created share called test .

I created login script and placed it in netlogon share as login.bat.

This is the script....
net use * /delete /yes

:test_local
ifmember test_local
if not errorlevel 1 goto next
echo Connecting to test_local...
net use r: \\server\test /yes >nul

:next

:end


When I remove the administrator from test_global I am still getting the maped drive (r) connection. It seams that the ifmember is not working.
0
Comment
Question by:josefkocarek
  • 2
3 Comments
 
LVL 85

Accepted Solution

by:
oBdA earned 1200 total points
ID: 14017108
Did you logoff after you changed the group membership, or did you just re-start the logon script from the netlogon share?
For further troubleshooting, add "ifmember /list" at the beginning of the script (which will display a list of the groups the user is member of), and add a "pause" before the ":end", so that you have the chance to see an error message that might appear.

net use * /delete /yes
ifmember /list
:test_local
ifmember test_local
if not errorlevel 1 goto next
echo Connecting to test_local...
net use r: \\server\test /yes >nul
:next
pause
:end
0
 

Author Comment

by:josefkocarek
ID: 14017588
Yes I have logoff.
I have used the /list option in cmd mode. I have navigated to the netlogon dir, where my logon.bat and the ifmember.exe is.
I have run ifmember /list and it doesn't show the membership in the test_local group.
What can be wrong?
I will try your script with /list and pause
0
 

Author Comment

by:josefkocarek
ID: 14145640
It is interesting that I don't have any problems running the script from user profile. The problem starts when I am using group policy. Why??
J0K0
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Greetings, Experts! First let me state that this website is top notch. I thoroughly enjoy the community that is shared here; those seeking help and those willing to sacrifice their time to help. It is fantastic. I am writing this article at th…
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question