MEMBER OF command in login script

Hello,
Just wondering if any one else has had trouble getting the MEMBER OF command to work in their login script? I have tried using group names as well as the full context but I can't get it to work and perform the desired actions.
Thanks.

On Wed, 12 Jun 2013 14:26:02 +0000, captainjd02006 wrote:
> Just wondering if any one else has had trouble getting the MEMBER OF
> command to work in their login script?
It's worked for me here for 15+ years. Maybe you're doing it wrong? Show
us a sample of what you're trying to do.
David Gersic dgersic_@_niu.edu
Knowledge Partner http://forums.netiq.com
Please post questions in the forums. No support provided via email.

Similar Messages

  • Part of login script not processing

    Running OES 11 with Windows 7 clients.
    I have a couple of drives that are not OES based. One is a NAS box
    and the other is a virtual appliance. I can manually execute the NET
    USE command on any Windows 7 PC in my office and map a drive letter to
    either unit. The NAS box works fine in my login script. Everyone
    company wide needs access to it, so the login script includes these
    two lines:
    @NET USE U: /DELETE
    @NET USE U: \\nas_box\path /PERSISTENT:NO
    Now I need to add the appliance. The net use command works fine
    manually for the appliance. Only a few specific people need access to
    it, so I created a group in eDirectory and added these lines to my
    login script
    IF MEMBER OF "appliance_group.my_org" THEN BEGIN
    @NET USE P: /DELETE
    @NET USE P: \\appliance\path /PERSISTENT:NO /USER:username password
    END
    The drive is not showing up. I'm stumped. I can't find any typos,
    the group exists and has the right members, and I can manually run the
    command and it works. So why wouldn't it run/map during the login
    script? How can I troubleshoot this?
    Thanks!
    Ken

    On 10/02/2014 15:58, KeN Etter wrote:
    > Running OES 11 with Windows 7 clients.
    >
    > I have a couple of drives that are not OES based. One is a NAS box
    > and the other is a virtual appliance. I can manually execute the NET
    > USE command on any Windows 7 PC in my office and map a drive letter to
    > either unit. The NAS box works fine in my login script. Everyone
    > company wide needs access to it, so the login script includes these
    > two lines:
    >
    > @NET USE U: /DELETE
    > @NET USE U: \\nas_box\path /PERSISTENT:NO
    >
    > Now I need to add the appliance. The net use command works fine
    > manually for the appliance. Only a few specific people need access to
    > it, so I created a group in eDirectory and added these lines to my
    > login script
    >
    > IF MEMBER OF "appliance_group.my_org" THEN BEGIN
    > @NET USE P: /DELETE
    > @NET USE P: \\appliance\path /PERSISTENT:NO /USER:username password
    > END
    >
    > The drive is not showing up. I'm stumped. I can't find any typos,
    > the group exists and has the right members, and I can manually run the
    > command and it works. So why wouldn't it run/map during the login
    > script? How can I troubleshoot this?
    TID 7014158[1] perhaps?
    HTH.
    [1] http://www.novell.com/support/kb/doc.php?id=7014158
    Simon
    Novell Knowledge Partner
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below. Thanks.

  • Login Script for HP Thin Clients using Citrix

    Hi
    Could someone please assist me with this.
    I use a login script on my domain but I am now joining the HP Thin Clients onto the domain which will use SSON (Single Sign ON) which will automatically load citrix and use the current username and password to sign into the citrix session
    Is there a command I can use that will "check" the version of windows and if this is Windows 7 embedded Standard edition, then it will bypass all the commands and go to the end of the script.
    I was trying something like this IF "%OS Version%" == "Microsoft Windows 7 Embedded Standard" goto END
    I know you can use this for a "Computer Name" but we have so many terminals and would need to store all the names of them on the servers.
    Please can someone give me some advise on this.
    Thanks
    Martin

    Hi,
    As far as I know, you can user command systeminfo | findstr /B /C:"OS Name" /C:"OS Version"to check current system edition in
    Command Prompt. However, as I'm not fimilar with script, to need more assistance for your problem, it would be better to provide your question at script center.
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?category=scripting
    Roger Lu
    TechNet Community Support

  • Windows 7 with Login Script from 2008 R2 server Duplicates Drives

    I have a single user that when they login to the domain and their login script runs, it ends up giving them duplicate drives. I can copy the script to another account and not have the issue. I have not tried logging in as the user on another machine yet,
    to see if the error follows the account. Anyone have any thoughts on what might be causing this? I have removed all of the drives from both the command line using
    net use /del *
    An example of the login script is
    net use z: /delete
    net use z: \\servername\sharename
    Its random which drives it will duplicate to.

    Hi Mgibson-TC,
    Can we run this script locally to check what’s the result?
    You can try Ed (DareDevil57)’s suggest first, if this issue persists, we can do some tests to narrow down this root cause.
    Alex Zhao
    TechNet Community Support

  • ARD Login Script Problem

    Hey there.
    I have a Mac lab that I am controlling with ARD. I know you can use the following UNIX script to login..
    osascript <<EndOfMyScript
              tell application "System Events"
                        keystroke "USERNAME"
                        keystroke tab
                        delay 0.5
                        keystroke "PASSWORD"
                        delay 0.5
                        keystroke return
              end tell
    EndOfMyScript
    ... However, my problem is that, for various reasons, the logins are set to choose from a list of accounts, not to enter the username. In other words, after the machine boots up, the user chooses the name of the account and then is prompted for the password.
    Can this script be modified to select a user or is there another way to script it?
    Thanks in advance.
    Adam

    > "Andrew Knoke" <[email protected]> wrote in message
    > news:typvh.9628$[email protected]..
    >
    > Also is there a way you can say in a login script to have users in a group
    > NOT get a map drive. In my example users in group would not get the H:
    > drive.
    >
    >
    > map root u:=%HOME_DIRECTORY
    >
    > If member of "small group.home" Then
    > goto five
    > end
    >
    > map root h:=sever\vol1:shared
    >
    > :five
    If not member of ".smallgroup.home" then
    map root h:=sever\vol1:shared
    End
    AZC

  • Hanging Login Script for Unmappable Drives

    I currently have a login script running on laptops at my work. We consist of two sites, each with their own domain. At Site 1 several drives are mapped using GPOs as the laptops are all bound to Site 1. If users head over to Site 2 though, they experience
    hanging times (that I am only able to contribute to the fact that Site 2 can't resolve these aformentioned drives). Login time can be up to about 40 seconds compared to the normal 4 seconds when at Site 1. Is there a way to just tell the PC to skip over these
    drive mapping if they aren't found immediately?

    Hi,
    Have you tried to use Net use command to finish this job?
    Use the Net Use command to map or disconnect a drive
    You can use the net use command for batch files and scripts. To use the net use command to map or disconnect a drive:
    To map a network drive:
    Click Start, and then click Run.
    In the Open box, type cmd.
    Type net use x: \\computer name\share name, where x: is the drive letter you want to assign to the shared resource.
    To disconnect a mapped drive:
    Click Start, and then click Run.
    In the Open box, type cmd.
    Type net use x: /delete, where x: is the drive letter of the shared resource.
    Roger Lu
    TechNet Community Support

  • Windows 7 & bat files & login script

    We have Netware 6.5 SP8.
    How can I run a bat file from the login script so that it will "Run as Administrator" on the Windows 7 workstations?
    Thanks...

    Actually this is more of a MS/Win7 batch processing question.
    In short, you can't assign Admin rights to batch files, only to EXE or
    shortcuts.
    Therefor, try creating a shortcut to the batch file.
    Right-click on the shortcut -> Properties -> Shortcut tab -> Advanced.
    Click "Run as administrator".
    Test locally.
    Now you can try passing that shortcut to the Login Script command
    handler - something like:
    #cmd /c start [shortcut]
    or
    #%<comspec> /c start [shortcut]
    Note, this is all untested and unsupported.
    Good luck
    Wolfgang
    On 28.06.2012 20:46, ncharleyhog wrote:
    >
    > We have Netware 6.5 SP8.
    >
    > How can I run a bat file from the login script so that it will "Run as
    > Administrator" on the Windows 7 workstations?
    >
    > Thanks...
    >
    >

  • ARD Login script doesn't work with similar usernames

    We have a lab of Macs all of which have two accounts whose usernames start with the same characters (rms and rmsadmin). There are times when we would like to be able to log on to all the computers simultaneously as the rmsadmin user with ARD. Because both of the usernames start with the same three characters, when the following commands are sent via ARD, the login process defaults to selecting the student account (rms) and won't log in as rmsadmin:
    osascript -e 'tell application "System Events" to keystroke "rmsadmin"'; \
    osascript -e 'tell application "System Events" to keystroke return'; \
    osascript -e 'tell application "System Events" to delay 0.5'; \
    osascript -e 'tell application "System Events" to keystroke "password"'; \
    osascript -e 'tell application "System Events" to delay 0.5'; \
    osascript -e 'tell application "System Events" to keystroke return'
    Anyone have a solution to this?
    Thanks in advance for taking the time to read this and giving it some thought.
    Peggy
    Xserve PowerPC G4, MacBook Pro, PowerBook, etc.   Mac OS X (10.4.8)  

    Since we do have the same problem but also some additional infos I bump this thread in the hopes of getting some answers.
    The login script does run, but unfortunatly only when I start it manually. It does not run during login.
    The only purpose of the script is to map some drives and it works fine under XP. Where else can I find infos about the problem?
    Our script looks like that:
    On Error resume next  
    Set objADSystemInfo = CreateObject("ADSystemInfo")  
    Set objUser = GetObject("LDAP://" & objADSystemInfo.UserName)  
    strDn = objUser.Get("distinguishedName")  
    strSam = objUser.Get("sAMAccountName")  
    strCn = objUser.Get("cn")
    Set colGroups = objUser.Groups  
    Pos = Instr(strDn,"OU=")  
    if Pos = 0 then  
        strOu = "" 
    else  
        strOu = Mid(strDn,Pos+3,2)  
    end if  
    Set objNetwork = CreateObject("WScript.Network")   
    objNetwork.MapNetworkDrive "h:", "\\frodo\user\" & strSam  
    objNetwork.MapNetworkDrive "j:", "\\frodo\misc" 
    objNetwork.MapNetworkDrive "l:", "\\frodo\department" 
    objNetwork.MapNetworkDrive "q:", "\\frodo\projects" 
    objNetwork.MapNetworkDrive "k:", "\\frodo\department\" & strOu  
    if strOu = "IT" then  
        objNetwork.MapNetworkDrive "x:", "\\frodo\software" 
    end if  
    'WScript.Echo strOut  
    For Each objGroup in colGroups  
        if objGroup.CN = "DreCash" then  
        objNetwork.MapNetworkDrive "p:", "\\gollum\drehcash" 
        end if  
    Next 
    objNetwork.MapNetworkDrive "i:", "\\192.168.1.6\shares" 

  • Run login script as root

    Is there a good way that one can run a login script as root these days?  In doing some research, I learned about login hooks, which assist with that.  Though with further research, I learned that newer OSes don't support that (or, rather, are depricated).  Is there maybe some sort of app you can run which will give you root access at a standard user login?  I am needing to work with the current user's home directories- as in, rename stuff that a standard user can't seem to do.
    Though on a related note, I noticed that OS X creates extended attributes in the user's folders which says that "everyone" can't delete them.  Renaming them wouldn't count as the delete attribute since I'd use the mv command on it, would it?  I haven't tried yet but I'm assuming that isn't my answer, anyway.
    Thanks!

    is this somthing that needs to be done each time you or the other user logs in or does it just need to be done once?
    If it is ongoing then yes you might have to do this with some sort of login script. But if it is a one time thing (make the alias once and that's it), then you can use the sudo command.
    Roughly you would log in as yourself, open the terminal app and then  use the sudo command to change the other users folder.
    If it is a one time thing post back and explain EXACTLY what it is you need to do and we'll try to come up with the steps to do it.
    If it is an ongoing thing then I'm not sure what the best path is to take.
    regards

  • Login Scripts question

    I have cobbled together a script which display a users quota information when logging in. The script works fine and I can get it to run from the login script managed preference set in workgroup manager. The problem I have is that the script is reporting the user as root rather than the login user. My understanding is that login scripts (not loginhooks) run as the login user rather than the root account or is this incorrect? Trust level is set to anonymous at the moment.
    Here is the script so its more clear what im doing:
    #!/bin/sh
    # quotas - displays usage levels on server.
    # get user's short name.
    thisUser=`whoami`
    # get quota from LDAP
    maxSpace=`ldapsearch -h myserver.com -b "dc=myserver,dc=com" -x -LLL uid=$thisUser apple-user-homequota|grep apple|awk {'print $2'}`
    # convert to MB
    maxMegs=`expr $maxSpace / 1024 / 1024`
    maxGigs=`expr $maxSpace / 1024 / 1024 / 1024`
    # Returns user's home directory disk usage in 1024 KB blocks.
    currentSpace=`du -sk ~ | awk '{print $1}'`
    # convert to MB
    currentMegs=`expr $currentSpace / 1024`
    # floating point math for percentage used
    spaceUsed=`echo "scale=2; $currentMegs / $maxMegs" | bc`
    percentUsed=`echo "scale=0; $spaceUsed * 100" | bc | sed -e "s/.00//g"`
    /usr/bin/osascript <<-EOF
    tell application "System Events"
    activate
    display dialog "Disk Usage for user: $thisUser used: $currentMegs Mb max: $maxGigs Gb percent: $percentUsed %"
    end tell
    EOF
    exit

    In the future, please post your Code Snippits between
    ... your code here ...
    That will preserve all your formatting and prevent the forum formatting code from stealing some of your characters.
    And it will make it easy for people to see what you really wrote as your script.
    PS. Why not just use the quota command?
    Message was edited by: BobHarris

  • Cannot get login script to run

    I have followed instructions in the Apple "User Management" admin guide but get stuck fairly early on because when I run this:
    dscl localhost -read /LDAPv3/myserver.private dsAttrTypeStandard:TrustInformation
    I get nothing in return. I have run this command on different clients with the same result.
    So then I tried to confirm the trust level by doing this and looking at the file loginwindow.plist file and I could see that Full Trust was set.
    I did everything else in the document as well as a couple of other things, but still the login script won't run.
    BTW the login script is very simple and just mount an afp share. Leopard 10.5.7 on client and server.
    Any clues would be greatly appreciated.
    Matt

    Have you checked the 'Computer Name:' in the 'Sharing' System Prefpane? The name cannot contain anything other than numbers or letters (alpha-numeric), this includes the BonJour (.local) name. If, for example, the hostname is set to 'client.domain.tld' in the 'Sharing' System Prefpane, the BonJour name will default to 'client-domain-tld.local'. Neither of those are 'legal' names. you must change theme both to something along these lines, 'ClientDomainTld' and 'clientdomaintld.local'.
    The script 'trust' level defaults to 'Full Trust' on the client but you have to make certain that the settings on the authentication policy on the OD master and the client both match.
    So for a 'Full Trust' relationship you must have:
    Digitally sign all packets (requires Kerberos)
    Block man-in-the-middle attacks (requires Kerberos)
    or the script won't run.

  • Login script not mapping drives for users

    I am in the process of configuring a new Windows 2008 terminal server in an existing Windows 2003 domain.  The TS is installed on a member server running Windows Server 2008 SP2.  The problem is that the domain login script (set in group policy) does not seem to be working for the users.  
    I have a special TS group policy for the new terminal server and have enabled loopback processing on the default domain policy. The only setting configured in the TS policy is the location of the user's terminal server roaming profile. This seems to be working.  Other than the login script, other elements of the domain-level group policy, such as folder redirection, seem to be working. When I run the GP result tool on the terminal server, it shows all of the appropriate group policies from both the TS policy and the domain-level policy, including the login script.  This login script is vital, since it does drive mapping for a bunch of resources on the domain that users need to run certain programs.  The odd thing is that the login script runs for the Administrator account, which uses a separate group policy that has inheritance blocked.
    Any help would be appreciated!
    Laurie

    I realize this is old, but for anyone who comes here after me, here goes.  What i found, is that instead of running a vbs script to map the drives, i run a vbs script to get the parameters i need, then i run a batch file from the vbs and pass it the
    parameters.  For some reason, when the logon script is run as a batch file, all of the drives map, even for users who are local admins.  It seems to run in the users current context, unlike a vbs script.  Here is an example :
    ' maps a shared documents folder "S:/" to the same folder as the OU that the user is in.
    Set objSysInfo = CreateObject("ADSystemInfo")
    strUser = objSysInfo.UserName
    Set objUser = GetObject("LDAP://" & strUser)
    strUserName = objUser.samAccountName
    strOUPath = objUser.Parent
    arrContainers = Split(strOUPath, ",")
    arrOU = Split(arrContainers(0), "=")
    strOU = arrOU(1)
    Set objShell = CreateObject("WScript.Shell")
    objShell.Run "\\domainname\NETLOGON\Login.bat """ & strOU & """", , TRUE
    And the batch file takes the parameters like so :
    :: Initialize variables
    set parentOU=%~1
    :: Delete all known shares
    net use s: /delete
    :: Map all known shares
    net use S: "\\domainname\mainshare\%parentOU%" /persistent:yes
    Make sure to use quotes around the variable in the vbs file, or your batch file will see it as two parameters.  Then make sure to use %~1 as the variable in the batch file to remove the quotes from the parameter that is passed.

  • Running Terminal Commands at Login

    Hi everyone!
    Just a quick question for anyone who may know the answer. I am trying to automatically run two terminal commands at login:
    sudo pmset -a halfdim 0
    sudo pmset -a halfdim 1
    I have absolutely no idea what I am doing, so if someone knows and can help me out, that would be great! Thanks a lot!
    ~ Philip

    Trying to make the screen wink at you when you login?
    You could install Platypus and create a little shell script with it and put it in your Login items. The script would be something like
    <pre class=command>sleep 30; sudo pmset -a halfdim 0; sleep 0.2; sudo pmset -a halfdim 1</pre>
    Those sleeps should be tweaked for the best effect. If sudo prompts you for a password, then it won't work.
    Message was edited by: jarik
    Hey man, check out the day we registered here!

  • POST request in a login script

    I have a strange problem when the variables that are passed to a PHP script dont get recognized in an equal statement. The java code :
    tring value, value2;
         try {
         BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
         URL url = new URL("................./admin.php");
         URLConnection connection = url.openConnection();
         connection.setDoOutput(true);
         System.out.println("Enter your username");
         value = stdin.readLine();
         value = URLEncoder.encode(value, "UTF-8");
         System.out.println("Enter your password");
         value2 = stdin.readLine();
         value2 = URLEncoder.encode(value2, "UTF-8");
         System.out.println("Acessing the ECHO server script");
         PrintWriter out = new PrintWriter(connection.getOutputStream());
         out.println("username="+ value);
         out.println("&password="+value2);
         out.close();
         BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
         String inputLine;
         System.out.println("Retrieving data");
         System.out.println("");
         while ((inputLine = in.readLine()) != null)
             System.out.println(inputLine);
         System.out.println("");
         in.close();
         catch (Exception e)
         System.out.println("Error: "+e);
         System.out.println("Processing Acomplished");In case somebody wonders, this is part of the php script
    if (isset($_POST['username']) && isset($_POST['password']))
    $username = $_POST['username'];
    $password = $_POST['password'];
    echo $username;
    echo $password;
    if ( $username == "1" && $password == "2" )
    echo "CORRECT";
    else
    echo "INCORRECT";
    }Now, the script successfuly recieved my data, and prints it back. However, whenever i try to check if the value is "1", for example, it always evaluates to FALSE. I am completely lost, because the script print back 1, and then says that 1 != 1
    I know it looks like script problem, but im almost sure that its not.
    Maybe the data that java post's is encoded differently or something, and the script cant really "interpret" it. Did anyone else encounter any problems with login scripts and java ?
    Sorry if this is a lame question, i'm just beginning....

    I know it looks like script problem, but im almost sure that its not.I'm almost sure it is. Check that it's not comparing the string "1" to the integer 1 or something. But the way you present it the problem is almost certainly in the PHP rather than the Java.

  • How do I connect my Centro to the Internet via bluetooth over PC's Internet? Where is Centro's PPP Connection Type? How do I setup Login Script for bluetooth connection?

    I am trying to set up bluetooth on the Centro to connect to the internet via my PC's internet.
    HotSync over bluetooth works successfully.
    Computer specs: Toshiba P205-S6277; Bluetooth Stack v5.10.04 (currently using); Bluetooth Monitor v3.01 (to use Vista's built-in bluetooth)
    I think I have narrowed my problem down to 3 things.
    (1) Finding Network Access properties (to allow connected devices to access the internet)
    (2) Finding Centro's Network Connection Type: PPP
    (3) Finding the correct Login Script to use
    for (1) I think I've looked everywhere; found nothing on Network Access. 
    Checked control panel: only Bluetooth Local COM
    Right-clicked bluetooth icon > Settings: File transfer, PAN Networking, PAN DHCP server, AV controls. Other bluetooth settings are for file transfer or object push. I don't see anything like this.
    I'm stumped on (2). It seems as if palm removed this option under Centro's Advanced network settings .
    Nearly all the forums that I read says to choose Connection Type: PPP.
    (3) Found 2 scripts that seemed would work. I don't know how it exactly works but it sounds workable.
    First script:
    Send: CLIENT
    Send: CLIENT
    Wait for: CLIENTSERVER
    End:
    Script 1 Connect Log:
    =======================================
    Connect Log
    S: client
    S: client
    R:
    Err: 0x121F   <<<netErrUserCancel b/c I canceled it. 
    Not connected
    ========================================
    I canceled it because the process would stay on "Signing In" then it automatically "Canceled" itself.
    Second script:
    Send CR:
    Delay: 1
    Send: CLIENT
    Wait For: CLIENTSERVER
    End
    **UPDATE** I found on this forum (Reply # 3689) that the script is needed only if you are using Palm OS 4 or under. Centro uses Palm OS 5.49121. Can anyone support this?
    Even without the script it has problems "Signing In".
    I'm currently reading this site and trying out its decribed methods. I will update this thread when I get the results.
    I'm using the Centro. And If anyone's been able to successfully connect to the internet on the Centro via a bluetooth connection to the PC WITHOUT 3rd party applications, please share.  If not, please share any ideas.
    Thanks!
    -Eric
    Post relates to: Centro (AT&T)
    Message Edited by naisanza on 01-01-2009 02:26 PM

    I've been going at this for days, and have probably exhausted all the proposed solutions on the first 3 pages of various google searches. I'm getting the feeling that Vista users are pretty much SOL for the time being.
    For the record, I just tried out a few of the solutions (mRouter & SoftickPPP) on XP and they work perfectly.
    Post relates to: Centro (Verizon)
    Message Edited by Cogwheel on 02-13-2009 09:45 AM

Maybe you are looking for

  • Closing PO using API

    Hello. I've seen that through the PO Open Interface it is possible to create/modify/cancel a PO but I cannot figure out how to CLOSE a PO. Do you know if it is possible and how? Thanks a lot for your precious help, Rosanna.

  • Blue Ray Players

     I recently bought a HP Envy 23 All in One PC with a blue ray player, my question is, do you have to play only blue ray dvds in the player.  I have been having problems playing my standard dvd, is this the reason I am having problems?

  • Can't create a window for execution. GDI or User resources too low

    I get this error when i try to do a single pass on my sequence. the labview code issued involves Classes and  a lots of Vi's that are included on a Hardware Abstraction Layer the sequence executes but i cant see anything on the screen like the pass f

  • Avoid the xml file generation

    hi all, i installed oracle 10g r2 in my machine. os is windows XP. in E:\oracle\product\10.2.0\db_1\sysman\emd\upload location every day lot of files are generated and consume lot of memory. i want to know what is the reason for this files and how to

  • JDO on the DC development

    Dear All,      I followed instructions of a persistence tutorial that I found from the help.sap.com ("Getting Started with Relational Persistence) and wrote down two projects. The tutorial uses individual projects as units for projects implementation