Get AD group membership for apple script

Hello All,
I am to create an app that mounts certain network folders with an apple script:
tell application "Finder" to close every window
tell application "Finder" to eject (every disk whose local volume is false)
tell application "Finder"
  tell Finder preferences
  set desktop shows connected servers to true
  set desktop shows external hard disks to true
  end tell
end tell
do shell script "killall Finder"
display dialog "Please enter your network username:" default answer "" with title "Network Login" with icon note
set username to text returned of result
display dialog "Please enter your network password:" default answer "" with title "Network Login" with icon note with hidden answer
set userpass to text returned of result
mount volume "smb://" & username & ":" & userpass & "@192.168.1.10/teacherread"
mount volume "smb://" & username & ":" & userpass & "@192.168.1.10/teacherwrite"
mount volume "smb://" & username & ":" & userpass & "@192.168.1.10/home/" & username
mount volume "smb://" & username & ":" & userpass & "@192.168.1.10/steps"
The users are in Active Directory and are in certain groups
I would like to go one step further and add: if in group teachers, and officestaff: mount teacherread, finance etc
The macs are not bound to the domain
Thanks in advance for your help
Daniel

Hi Again,
Another way to look at it might be if error 5014 (don't have permission) try next line
try
mount volume "smb://" & username & ":" & userpass & "@dc1/teacherread"
*if result is error number 5014 goto next command
end try
*try
mount volume "smb://" & username & ":" & userpass & "@dc1/teacherwrite"
*if result is error number 5014
end try
*try
mount volume "smb://" & username & ":" & userpass & "@dc1/home/" & username
*if result is error number 5014
*end try
*Not sure on syntax
Thanks
Daniel

Similar Messages

  • Get AD group membership doesn't work for global groups

    I want to pull the group membership for OBIEE directly from AD.
    This has been covered in many blogs and forums, no problem, I've found some user created functions - basically all of it uses
    DBMS_LDAP package methods
    with one exception that additionally to it also uses
    DBMS_LDAP_UTL.get_group_membership
    ALL THOSE functions work BUT I've verified it with the actual group membership from AD or adfind tool (http://www.joeware.net/freetools/tools/adfind/index.htm)
    The list returned by Oracle packages doesn't match, or to be exact only partially matches the factual AD list.
    I've done some research and found there are three types used for defining group's scope by AD:
    Domain Local, Global, or Universal
    (http://technet.microsoft.com/en-us/library/cc755692(WS.10).aspx)
    leaving the first one out of the scope as we don't use it
    - I've verified and found ALL missing ONES are defined as GLOBAL
    All the Oracle funcitons I've found correctly pulls only UNIVERSAL group memberships and none of GLOBAL
    Microsoft documentation says that both of them (Universal and Global) have forest-wide visibility....
    and so AdFind can list both..
    so why Oracle limits the search to UNIVERSAL ones only?
    Maybe it's a matter of initialize those DBMS_LDAP packages differently or passing slightly different parameters??
    I've really tried a lot of this code in different combinations but no joy
    Has anyone got some ideas?

    ...I try to block the usage of the command prompt only on this server.
    I have the same question as jrv: Why? It doesn't increase security. The command prompt is a program, not a security boundary.
    Disabling the command prompt does NOT increase security
    -- Bill Stewart [Bill_Stewart]

  • How to see the group membership for a user in oidadmin

    how to see the group membership for a user in oidadmin?
    I see the memberships in oiddas, but I would like to know if its possible to see them in oidadmin? Thanks.

    Hi,
    For what I understand, you know the user and want to know the groups that the user is member of (am i wrong?)...
    With this query you pass the user's DN to the ldapsearch and the search gives you back the list of groups the member is a member of, all you need to do is change the value "uniquemember=cn=orcladmin" in the query for your own user.
    For example:
    $ORACLE_HOME/bin/ldapsearch -h localhost -p 389 -D "cn=orcladmin" -w oracle10g -b "dc=acme,dc=com,dc=au" -s sub "uniquemember=cn=orcladmin" dn
    will give you the list of groups that the user "cn=orcladmin" is a member of.
    $ORACLE_HOME/bin/ldapsearch -h localhost -p 389 -D "cn=orcladmin" -w oracle10g -b "dc=acme,dc=com,dc=au" -s sub "uniquemember=cn=smithj,cn=Users,dc=acme,dc=com,dc=au" dn
    will grive you all the groups that the user smithj is a member of.
    if you don't want to get the DN of the group you can change the last parameter of the query like this
    $ORACLE_HOME/bin/ldapsearch -h localhost -p 389 -D "cn=orcladmin" -w oracle10g -b "dc=acme,dc=com,dc=au" -s sub "uniquemember=cn=smithj,cn=Users,dc=acme,dc=com,dc=au" cn
    will give you the CN of the groups the user is member of.
    let me know if this is what you need.
    Regards,
    Juan

  • Report of Groups owned along with group memberships for each group, all in a single .csv file

    Hello all,
    What I'm trying to do is generate a report of all groups owned by a specific user, along with the group memberships, and output it all to a single .csv file. In the .csv file, I would like to have the group names as the column headers, and underneath
    the group name, list all the members of the group down through the column. So for example, if User1 owns 3 groups, the output would look like:
    What I'm having trouble with is outputting the objects to the .csv using New-Object psobject, and I'm starting to wonder if there is an easier way to do this and my brain is just fried.
    Any ideas?

    OK so I can try and give some code here, but I'm asking more of a concept question about how PowerShell builds objects so I'm not sure it will help....
    $User = "User1"
    get-adgroup -filter {managedby -eq $user} -pr member | %{
    $_.name
    $_.member
    OK so this is a simple script that outputs a group name followed by the membership, all in a single column. What I would like is for the group names to each be the header of a column, and have the membership listed underneath. For example:
    Is this possible in PowerShell?

  • Read group membership for a user object and populate every group with matching user from another domain

    I have LON\JSmith in LON domain and DEL\JimSmith in DEL domain
    I would like to extract group memberships of LON\JSmith in LON domain and append matching by email (i.e. DEL\JimSmith) user object in every group in LON domain.
    for instance
    LON\JSmith and DEL\JimSmith is the same person and has same email address [email protected]
    LON\JSmith belongs to 3 groups - LON\localadmingroup;LON\univdesktop;LON\globalsurvey
    The outcome of the script should be
    LON\JSmith; DEL\JimSmith    should be in 3 groups - LON\localadmingroup;LON\univdesktop;LON\globalsurvey.
    How can i do it?
    Navgup

    Hi Navgup,
    Please refer to the script below, to query users in other domain by specifying the parameter "-Server" in the cmdlet "get-aduser", and also note I haven't tested the script below:
    import-module activedirectory
    get-adgroupmember "group"|foreach{
    $email=(get-aduser $_.samaccountname -properties *).EmailAddress#get the user email
    Get-ADUser -filter {EmailAddress -eq $email} -properties * -server DomainB.company.com|select samaccountname, memberof}#filter user name and group with the email in other domain
    To get users across domain, please also refer this blog:
    Adding/removing members from another forest or domain to groups in Active Directory:
    http://blogs.msdn.com/b/adpowershell/archive/2010/01/20/adding-removing-members-from-another-forest-or-domain-to-groups-in-active-directory.aspx?Redirected=true
    I hope this helps.

  • Minimum group membership for imp/exp for ora 8i(client)  windows xp users

    Hi to all,
    For oracle 8i clients, windows xp users, what is the minimum group membership required that can be used so that the users can import or export dmps. Using Administrators imp/exp works ok... Any alternative?
    Thanks

    Hi Thierry,
    Please do not confuse the issue. Here we have the windows Operating System - privilege and then the Oracle database user privilege. In my case the Oracle database user privilege is DBA. If the user is given a Windows - Administrators privilege (which I do want to give) the exp/imp creates the DMP and log file. But any other standard windows privilege (with DBA privilege) the exp/imp does not create the dmp and log file. I hope I am clear and now you can suggest some alternative solution to OS - administrator.
    Thanks again

  • Can u get a web browser for apple tv?

    Can you get a web browser or apps for apple tv?

    In short, not on AppleTV itself.
    The only way to use other apps/browsers is to use Airplay from an app/browser on an iPhone/iPod Tocuh/iPad.
    AC

  • Design question: Change Group membership for a AD resource via SelfService

    Hi all,
    based on the OIM tutorials, I designed OIM that way that an end user can successfully request a resource. Is there a way to allow end users to modify their resource "subscriptions"? For example, I would like to allow end users to change their AD group memberships after the initial provision to the resource.
    From what I have learned from the tutorials, I would assume to create an AD group membership attribute in the user account profile form and propagate changes to that attribute back to AD.
    Or is there a way to allow end users to change their resource data directly under "My Resources" ?

    there is no concept of requesting a modification of an already provisoned account. Like you said this can be achieved thru an attribute on the user's profile and on changing that attribute, downstream applications can be propagated the new value.
    Typically if changes to an already proviisoned account needs to be done in oim and through oim, an oim admin goes to the user's resource profile and clicks on edit on the process form and can edit any data there. in case of ad groups, there will be a child process form that shows the groups that the user is a member of, you can insert(add) new groups or delete existing groups from there and save the form. In the proviisoning porcess of AD you will need to write a porcess task, which should add/remove the user from the specified group in AD on the trigger when a new group is added or an existing group is removed wehn the admin is modifying the user's AD process form/process child forms in oim.

  • TS1741 I cannot get the remote app for Apple tv work on either my iPad or iPhone. Home sharing is "on". Any ideas?

    Why won' remote app for Apple tv work on my iPad or iPhone?  Home sharing is turned on.

    A frequent cause of consistent failure to enable AirPlay or HomeSharing at all, is the service being blocked on the network. Make sure your network isn't hidden, has a unique name, that MAC address authentication is disabled, security is set to use WPA 2 Personal and that there is only one router/device acting as a DHCP server and providing NAT services.
    Make sure your router/computer allows access over the following ports
    Port
    Type
    Protocol
    Used By
    80
    TCP
    HTTP
    AirPlay
    443
    TCP
    HTTPS
    AirPlay
    554
    TCP/UDP
    RTSP
    AirPlay
    3689
    TCP
    DAAP
    iTunes/AirPlay
    5297
    TCP
    Bonjour
    5289
    TCP/UDP
    Bonjour
    5353
    TCP/UDP
    MDNS
    Bonjour/AirPlay
    49159
    UDP
    MDNS (Win)
    Bonjour/AirPlay
    49163
    UDP
    MDNS (Win)
    Bonjour/AirPlay
    Refer to your router manual/manufacturer for any settings that are specific to that model.
    Another frequent cause of consistent failure to enable AirPlay or HomeSharing at all, is security software, in many cases configuring it correctly, disabling it or even uninstalling it can help, but in some cases the security software can cause problems that simply reconfiguring, disabling or uninstalling cannot reverse.
    If you are consistently unable to activate AirPlay, have tried all the steps in this article and have security software installed on your system, you might benefit from contacting its provider or participating in any online forums they run to discuss the matter with them

  • How to get the groups info for user

    Hi guys i am new to ALUI..
    i am trying to do some enhancement.
    i want to know how to get the information of the users group and the group details using the IDK API?
    Can sombody share some code?

    Hello,
    You are welcome. Here is one way of get what you want:
    1) get all groups id's
    IPortletContext - >IRemoteSession -> IUserManager - > getCurrentUserGroups() -> int []
    2) get details about group
    IRemoteSession.getObjectManager(ObjectClass.UserGroup ) ->
    cycle over int []: {
    IObjectManager -> querySingleObject(comminity id) -> IObjectQueryRow -> getName()
    Because you are going to use PRC and make SOAP calls to portal don't forget setup WS to pass token to portlet (check WS settings)
    Edited by Bryazgin at 05/29/2008 7:48 PM

  • I have been trying to track my ipod since January when it was stolen from a restaurant.  It is turned offline.  How do I get a court order for Apple to help me get my ipod found and returned back to me?

    I have been trying to track my stolen ipod since January.  It has been turned offline.  How do I get a court order from Apple to help get my ipod returned back to me?  Thanks

    I feel your pain, but honestly, Apple won't life a finger to help you.
    If you really want to get a court order, call an attorney.

  • How to get 802.11n speed for Apple TV?

    I installed my first Apple TV yesterday. Great stuff!
    My iTunes movie library is on a Core 2 Duo MacBook Pro. I have not yet used the AirPort Extreme 802.11n Enabler on this MacBook, since I just found out it exists. If I use it, can I utilize 802.11n sync speeds with the Apple TV? How?
    My AirPort network uses only an "old" 802.11g AirPort Extreme base station, not the "new" AirPort Extreme base station with 802.11n.
    I have three 802.11g AirPort Express base stations on my network, mainly for using AirTunes.
    My iMac connects to my wireless network using 802.11g, and I don't think the 802.11n Enabler works with it.
    My cable modem current connects to my Airport Extreme (802.11g) base station via Ethernet.
    I understand I can get a new AirPort Extreme 802.11n base station to replace the 802.11g one, and that would let me use the higher 802.11n speed from the MacBook to the Apple TV. It would also allow (unless I misunderstand) all my 802.11g devices to access the network at the lower speeds they are capable of. Correct?
    I also understand there is something called a "dual band network" that involves using both base station types in one large network, but I don't know what the advantage of doing that would be, compared with just replacing the old base station. Can someone fill me in on that?
    And, is there any way to get 802.11n speeds from the MacBook Pro to the Apple TV without getting an 802.11n base station?
    Thanks in advance.

    If I use it, can I utilize 802.11n sync speeds with the Apple TV? How?
    And, is there any way to get 802.11n speeds from the MacBook Pro to the Apple TV without getting an 802.11n base station?
    No. Unless you set up an adhoc network between your Mac and the Apple TV.
    I understand I can get a new AirPort Extreme 802.11n base > station to replace the 802.11g one, and that would let me > use the higher 802.11n speed from the MacBook to the Apple > TV.
    Yes, it would.
    It would also allow (unless I misunderstand) all my 802.11g devices to access the network at the lower speeds they are capable of. Correct?
    If you set things up this way, then I believe you wont be able to use wideband mode on the AEBSn. Your AEBSn will be opperating in mixed mode and its 802.11n performance will be degraded. The best set up would be to keep your old router to service the G only devices, and have your new AEBSn service the N capable devices. This would allow you to take full advantage of the performance increase provided by 802.11n capable devices.
    Message was edited by: ctomer

  • Can't get past payment screen for Apple ID?

    Hello All,
    I'm a new iPhone user. In my company, we're transitioning from Blackberry to iPhone which I'm responsible for setting up. During the activation process, I have run into an issue with multiple devices where I cannot get past the Apple ID account settings.
    Here's the process I've taken to get there...
    After doing the basic setup of the iPhone including creating a new Apple ID account (which I've verified as well via an email sent), I go to the app store to download Cirtirx Worx Home, which is free.
    Once I click on 'install', It then pronpts me to enter an existing Apple ID or create a new one. I select existing since one was already created and verified.
    It then asks for the country, which I select and then takes me to a screen that asks for type of payment. I select "none". Once I click 'next', I should see the 'done' option in the top right corner, but instead, I get a 'cancel' option in the top left and a message in red that indicates to contact iTunes support for help. I have filled out all necessary fields as well on that screen.
    I was able to complete a few of them, so I know the steps and process to have them activated.
    I have updated the software to iOS 7.1.1 and I have tried "erase all content and settings", but doesn't resolve this issue.
    Please advise.
    Thanks,
    Tom

    Have you considered doing what the message suggested and contacting iTunes support?
    You can only use a single Apple ID on a limited number of devices. I suspect you've hit your limit.

  • How do i get my money back for apple tv

    I purchased two first generation Apple TV's. Recently Steve Jobs admitted that they were a problem form he beginning. I have had nothing but problems with them: syncing, streaming, oveheating, you name it. I love Apple products and actually ordered 2 new Apple TV's this morning. I think it may be a nice gesture to offer at least a credit for the Apple TV first generation owners.

    No idea when they were sold to you, but they might still be in warranty as old stock was sold in some shops after ATV2 was announced (in fact I have an unopened 160GB AppleTV1 that is technically still under warranty, that I bought a few months after AppleTV2 was announced).
    I have to say if you experienced problems with streaming with the first gen units, you may well find the same with the second generation units if it's anetwork problem not the AppleTVs themselves.
    I've rarely had any streaming/syncing issues with AppleTV1 or streaming problems with AppleTV2 - but I do know under certain circumstances I can get wi-fi interference that makes wi-fi data transfer unreliable.  One of the best purchases I made weresome Devolo powerline network adapters that basically give you ethernet sockets at the mains socket sites. (Belkin, Netgera etc make them too).  Unless you can run cable easily,these are a great solution if wi-fi is unreliable.
    It has always been claimed that the AppleTV1 design was such that heat dissipates through the top of the unit, but I think this was a design flaw as they could get uncomfortably hot to the touch - if you dismantle one, the motherboard/processor etc are in contact with the top not the bottom so the heat conducts through the top directly as well as circulating inside via a small fan.
    Sorry you didn't get one with ATV1 but I actually prefer them to ATV2 - their only downside for me being that they will inevitably fail at some point due to mechanical drives, possibly contirbuted to by the heat.
    AC

  • Group membership for users is not reflected at the client until full reboot

    Ok, so I am new to this:
    So I created two groups on the server g1 and g2. Created two server users u1 and u1. I have one client with three accounts: System Admin, u1 and u1.
    On the server:
    g1 has one member u1
    g2 has one member u2
    When I swap the membership on the server using Server pref. or Workgroup manager, the users on the client still have access to their original group.
    I tried logging everyone out of the client. I does not work.
    The only way is to reboot the client completely. However, sometimes when I change the membership it does get reflected on the client. Any ideas?
    Equipment:
    One (1) Mac Mini Server 10.6.3, clean install. (defaults to OD)
    One (1) MacBook Pro 17" , 10.6.4
    Is there a way to push?

    Answer!
    UAC (User Account Control) must be set to OFF to disable this message.
    Another error message that really has nothing to do with what's really happening!
    Ugh.

Maybe you are looking for

  • How can I tell if I have an Aluminum or Titanium G4?

    Hello. I have a G4 Powerbook and I'm really not sure if it is the Aluminum or Titanium model. How can I tell? Thanks!!!

  • Select query from 2 schema & database

    Hi, what privileges should i give to execute select query from 2 schema & database in oracle thanks

  • Remove duplicate photos from photos

    I upgraded to OS 10.10.3 which then allowed me to move my library of 10,000+ photos from iPhotos to the new Apple Photos program. After I moved the library I noticed I had some duplicates in my library.  These duplicates are not from the upgrade. The

  • How to set the BDC Call transaction Program in Background

    Hi All,         I have a requirement. If i execute a BDC Call Transaction Program in Background it is showing 0 seconds means it is not executing. Normally it is working properly. If execute in background it is not executing. But my client wnats to e

  • PPOCE transaction in OM

    dear experts, while using PPOCE transaction for creating org units and positions for getting a org structure , i am facing a peculiar problem ? 1. executed the transaction code PPOCE 2.Selected the "new organisational unit" in the overview area 3. Ga