Home Forums OS X Server and Client Discussion Questions and Answers Applescript application to mount drives via workgroup manager

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #376792
    fatal
    Participant

    Hello,

    I am fairly new at this. I have setup an applescript to mount my users group drive and user drive.

    Basically I want this script to run every time a user logs in with a mac client. I have all my users in groups and in workgroup manager, if i try to manage Scripts for groups it says: ‘these settings cannot be managed for Groups’

    So I compiled the script as an app and added it to ‘items’ so it can execute at login. When a user logs in, it doesn’t execute the script and in login items on the client side, it says ‘unknown’. I believe what is happening is that it is looking for /shared/script (locally) and i want it to look for mountpoint/scripts/script (i don’t want to manually place the script in each mac)

    So the next thing I tried was adding a shared folder to be mounted on the desktop, then putting the application in there and having it executed from that folder… the folder gets mounted and the script is in there, but still does not execute… if i double click, on the script all is well…

    I have the server bound to an active directory domain and have an OD group my manage the mac users… the shares are on a windows 2003 server, with either SMB or AFP

    Any help is appreciated….

    thanks!

    #377262
    tlarkin
    Participant

    You can only do log in hooks on computer groups, not user groups. If you do authenticated binds and import computer names into a list in OD you can set computer group policies to execute log in scripts.

    For what you want to do though, launchd can handle this.

    Are there going to be passwords involved to map these shares? if so, you gotta store the password in the script which is not a good idea security wise. Unless, you maybe take certain measures. I only put passwords in scripts when I have to.

    If you put the launch agent in /Library/LaunchAgents will will run anytime any user logs in. If you put it in /Library/LaunchDaemons it will run anytime the system is booted up, globally.

    use launchctl to load the launchd item permanently and you can then have it run forever.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Comments are closed