Run script after home directory mounts??

Does anyone know if there is a way to run a script when a user logs in that will run after the users home directory mounts. Currently a user logs in, the script runs via a login hook then the home directory mounts. I need the home directory to mount first then the script to run. The users are authenticating to active directory. Please help!!!

Any resources on how to write a launchd script? Here's what my applescript looks like. I'd like to convert this to launchd so it will run after the home directory mounts:
tell application "Finder"
mount volume "smb://server05/assignments$"
end tell
tell application "Finder"
mount volume "afp://Macapps:[email protected]/MacApps"
end tell

Similar Messages

  • Mountain Lion Server: Network users Home directory mount problems

    I am having several problems with my server after a latest name change of the server via Server.app. (A first name change made problems, after that I have been trying to repair, changing the name a few times more. With latest name change, I also changed the server name itself from Foo to Bar while changing domain name from domain.com to bar.domain.com after which I repaired DNS so it covers the whole domain.com domain).
    The users in the Network directory think their home directory is on afp://domain.com/Users, but the server is now called bar.domain.com. /Network/Servers/bar.domain.com does not exist on the server. Client machines (with mobile home directories) are now able to sync, because I added an A record for domain.com to DNS (not  nice, but does the job, or more specifically that job). Also on the clients, I can go to a SHARED folder in Finder with the name Bar and go to Users and see al the home directories there. But:
    bash-3.2# ls -l /Network/Servers/
    total 4
    dr-xr-xr-x  2 root  wheel  1 Apr 14 11:14 domain.com
    dr-xr-xr-x  2 root  wheel  1 Apr 14 11:14 foo.domain.com
    bash-3.2# ls -l /Network/Servers/*
    /Network/Servers/domain.com:
    total 2
    dr-xr-xr-x  2 root  wheel  1 Apr 14 11:14 Users
    /Network/Servers/foo.domain.com:
    total 2
    dr-xr-xr-x  2 root  wheel  1 Apr 14 11:14 Users
    bash-3.2# ls -l /Network/Servers/*/Users
    /Network/Servers/domain.com/Users:
    ls: Users: Input/output error
    /Network/Servers/foo.domain.com/Users:
    ls: Users: Input/output error
    So, on the server looking for folder ~user does not work. It wants to  go to afp://domain.com/Users/user but that is unreachable.
    Any tips on what I can do except do a clean rebuild of the server (again)?
    (One of the obvious problems is that the Realm of OD is still called foo.domain.com, the origin of my problems has been that the first name change from foo.domain.com to domain.com (ill-advised, I know) failed — partly).
    What I'd like to know is:
    - where is it determined which servers end up in /Network/Servers?

    Som additional info:
    Other machines can mount afp://foo.domain.com/, afp://domain.com/ and afp://bar.domain.com/, but the server itself cannot mount them via Finder.

  • 10.6 home directory mounting with active directory and open directory integration

    Hi guys i am having some issues in my new mac environment. I have a windows network with an server 2008 active directory. I have just recentlly created a "magic triangle" setup with active directory and open directory. When my users login via windows their home folders mount perfect. When any user logs in to any iMac in the building it does not work. They login perfectly fine, but their home folders do not mount. When i try mounting them manually with smb, i get a prompt for credentials. I am thinking this is my issue, my Single sign on with kerbos is working but for some reason is not logging in correctly. If i type in my credentials with my domain first then my name it works.
    For example DOMAIN\jsmith works, but the way i think the mac and active directory is doing it now is just jsmith without the DOMAIN.
    I feel like this is the problem with the home folders not mounting.
    Can anyone provide some help with this?
    Thanks,
    Dani

    Hi dani190,
    are you using the fully qualified domain name of the network server? ie if your server is bob. and your domain is domain.company.com. then the FQDNS would typically be bob.domain.company.com or bob.company.com.
    If the FQDNS works, then have you checked in the AD to make sure the path to the network home folder uses the FQDNS?
    For the contact search path, did you put the AD at the top the list? (in directory utility)
    Did you set the WINS work group on your client computer to your domain?
    ie:Apple Menu, System Preferences, Network, Active Network Port (ethernet and or airport) , Advanced Button, WINS Tab, set workgroup to the name of your domain. ie domain.company.com and or company.com

  • Run script AFTER boot

    I want to run a non-ending script after boot. And I still want to be able to login. So adding the script to rc.local won't fix my problem since the boot process won't finish so that I can login.
    Adding the script to "dillons" cron doesn't seem to work either since you cant specify @boot in it. And setting "* * * * *" will result in 1 minutes wait before the script runs.
    Does anyone have any good ideas to solve my problem?

    as mentioned you can background it in rc.local, or you can create a custom /etc/rc.d file which will make it a daemon just like any other.  there are templates or just copy some existing simple one.  i created one for dropbox which is available on the wiki if you'd like to use it as a guide.
    /edit.  whoops; took too long to craft that response.  ignore me.
    Last edited by brisbin33 (2009-06-25 14:16:28)

  • Run script after period of inactivity

    I'd like to run an apple script after a certain period of inactivity (say 10 minutes). is there a way to do that?

    Sample code:
    property iRun : 0 -- Global variable (retains latest value between applet executions).
    on run
    set iRun to 0 -- Clears global variable.
    say "Working" -- Optional, your code here.
    end run
    on idle {}
    if (iRun > 0) then -- Do not execute code immediately, instead wait until after delay time.
    say "Processing" -- Your code here.
    end if
    if (iRun = 1) then quit -- Optional code, to quit after processing use code, after a single delay period.
    set iRun to 1 -- Needed to guarantee that code is processed after delay period.
    return (60 * 10) -- Where '10' indicates 10 minutes.
    end idle

  • Time Machine Service - Run scripts after backup

    I am running Mavericks Server (10.9.5), server version 3.2.2
    The server is used as a backup destination for a lot of Macs, and I am trying to create a complementary service that keeps track of all of the incoming backups and logs all backup events.
    Is there any way to have a script execute whenever the Time Machine service completes a backup, or for that matter, and way to tell when a backup is running or has completed?
    The options I have thought of so far are:
    1. Script that monitors the logs to look for appropriate events
    2. Run script on timer that scans the backup folder and looks for new backups
    Neither of these seems ideal to mean, so I was hoping someone might have a better idea.
    Thoughts?

    In order to back up the configuration and state of some services the server needs them to termporarily be turned off.  This includes the backing up of Time Machine.
    So in order to back up the Time Machine configuration and details about what computers it is backing up where, the server would need to turn off the Time Machine backup service.  But if it's turned off, it can't use it to back things up.
    Similarly, imagine you needed to restore the backup.  To view the backups you would need the Time Machine backup service to be working.  But you can't overwrite the configuration and status information of a service which is turned on, because that would confuse the process doing the serving.  But if the process is turned off, you can't use it to restore the backup.
    So do what Linc said: use the System Preferences panel to back the computer up, and don't back it up to the same device you're backing up its Time Machine clients to.

  • Run script after Network turns off

    Hi all,
    i have a problem with my Network which will not reconnect after suspend or when it is turned off by hardware switch. I already figured out that the problems do not appear when wpa_supplicant is killed right before suspend/hardware switch.
    So, what i now want to do is, to kill wpa_supplicant when suspend/hardware switch is used and right after network stops. The Problem is: I have no clue about how to achieve this.
    I read a bit about systemd and service-files in the wiki but I'm not really sure how to implement this (especially which targets etc. i should use)!
    Thanks for your help!
    Last edited by FatRhombus (2014-07-18 17:38:26)

    Not an answer since I couldn't slightly understand what you were saying but considering it is a laptop, and not tweaked for the subject, TLP is a software that can disable and enable your wifi card before suspend, non-activity for a period or enable after waking up, powering on et alii. It has a commenting configuration file and well documented in wiki. Maybe you should try it.

  • Linux users cannot open Firefox on multiple systems that are mounting the same network drive as their home directory

    I am supporting a user who is logging into multiple linux systems that all have the same /home directory mounted to a network filer.
    When the user opens firefox on one system, he is unable to open firefox on other systems.
    I'm assuming this is because firefox is storing his profile in /home.
    These are Centos 5.4 x64 systems, authenticatiing to a Windows 2003 Domain. The filer that hosts the home directories is a NetApp with both CIFS and NFS permissions enabled on the volume that /home resides. We are using the version that came with the Centos installation, 3.0.12

    So while this worked well for my computer at home, it does not work for the actual computer the disk is mounted on.  If I try to mount the disk as the "office" user, the computer rejects the connection to itself and tells me to access it locally.  Any ideas on how to handle this?  Thanks again.
    dlr

  • Running scripts in PS after exporting from LR- errors?

    I'm have a lot of trouble running scripts after editing in LR. After editing, I export the images as jpeg, 300 dpi and hightest quality (100). Next, I open CS2, try running a script and it won't work? I get an error message? Has anyone else run into this?

    I haven't. Have you tried making a droplet to run at the end of the LR export?

  • Home Directory Sync Broken

    Ever since I rolled out OSX 10.8.2 on some test macbook airs the home directory sync (thru AD home directory path) doesn't work. When a user logs in with their AD credentials, everything works fine otherwise:
    The home directory mounts
    I am able to access all of the contents of the network home directory from the dock
    When I attempt to manually sync the network home directory the progress bar shows that it is in progress for a second and then shows "complete" or "finished". I don't remember the exact wording. When I check the local user folders to see if any of the content from the networked home drive has sync'd "down" from the file server all of the directories are empty just like they were prior to the sync.
    Does anyone have any ideas on how to remedy this, or is this just completely broken in ML? It used to work fine on SL and it's a shame to lose such a nice feature.

    suggest you ask in the Tiger or Snow leopard server forums
    http://discussions.apple.com/category.jspa?categoryID=96

  • Autofs home directory not mounted after reboot.

    Hi,
    I am having trouble with one of my user home directory. The home directory does not seems to be mounted after reboot of the system.
    df -k as root does not display the home directory in question until the user of the home dierctory is logged into the system.
    Please help advise.
    Thanks alot in advance.
    Yours Sincerly.

    Hi, I actually did manage to cd to the home directory but unfortunately ls of the directory shows empty until I su to squid user and did an ls of the directory.
    Any pointers what I can check to ensure that my autofs enviorment is correct in additional any idea what's wrong with my autofs enviorment?
    Thanks alot
    Deeply appreciated
    Regards

  • 10.5 clients won't login/mount home directory

    Hello all,
    I am having some issues with 10.5.8 clients logging in network users.  At our school, we have a "magic triangle" setup -- Mac and PC clients, an Active Directory for user authentication (a Win 2k3 server DC I believe), and an Open Directory server (running 10.7.5 OS X Server) for Workgroup Managment and software updates.  Along with this, there is a Linux NAS box that acts as the file server hosting the user's home directories.
    I have a few test student accounts that I have set up exactly the same way that normal student accounts are added to AD.  Users have complained that these 10.5.8 clients will not let any students log on, as I have verified with my test student accounts.  When logging in, an error comes up that says "Logging into the account failed because an error occurred".  In secure.log I get a "smb_mount: syserror = Broken pipe" line along with
    ERROR | -[HomeDirMounter mountNetworkHomeWithURL:attributes:dirPath:username:] | PremountHomeDirectoryWithAuthentication( url=smb://fileserver.domain.org/username, homedir=/Network/Servers/fileserver.domain.org/username, name=username ) returned 32
    When I turn off "Create Mobile Account at Login", the user can log in just fine, which obviously leads me to believe that there is an issue with mounting the samba share for the user's home directory during the HomeSync.
    I know the client can resolve the file server's hostname by nslookup, so I don't think DNS is the issue.  But I'm all out of ideas after looking everywhere online, and am hoping someone can assist me with this.  I'm just a computer technician and not a network sys admin by any means, but I know a good enough amount to try to troubleshoot this.  Even my network manager is stumped, and his answer is to upgrade the client to 10.6, resolving that the issue is with 10.5. I want to try to solve this issue rather than having to re-image all the 10.5 machines.
    Obviously school is out for the weekend, so I won't be back for a couple days to work on the issue if anyone does respond in the next couple days.
    Thanks in advance!
    -Brandon

    Hi Brandon, certainly no expert at this, but let me trow this out at you...
    Found a work-around. This command adds a delay, in this case 45 seconds, before displaying the Login Window.
    defaults write /Library/Preferences/com.apple.loginwindow StartupDelay -int 45
    If the Login Window UI detects that the network servers are available when it starts, it will skip the delay, also if network servers become available before the delay expires, the Login Window UI cancels the delay and displays.
    Kent

  • Home directory and personal website trouble after 10.6.7 Server

    Xserve recently upgraded to 10.6.7 Server and it seems to have broken two features:
    When doing Connect to Server as an LDAP user their home folder is no longer available as a mountable volume. The share that holds all user home folders IS available so that's not the end of the world.
    However this also broke the personal web sites, so going to:
    http://<serveraddress>/~shortname now just gives a 403 error
    and I get these errors in the error_log (under WebServer in Console)
    [Tue Aug 24 11:38:48 2010] [error] [client 10.2.104.16] File does not exist: /Library/WebServer/Documents/~walshd
    [Mon Apr 25 09:11:22 2011] [error] [client 10.2.104.16] (62)Too many levels of symbolic links: access to /~walshd failed
    [Mon Apr 25 12:39:39 2011] [error] [client 10.2.104.16] (62)Too many levels of symbolic links: access to /~walshd failed
    The sharepoint is on an old XServe RAID unit connected directly to server via FibreChannel, but that hasn't changed in a long time...only recent change was running all Software Updates which included moving up to 10.6.7 Server.
    Any ideas what I'm missing or where to start looking to resolve this?
    Thanks!

    Camelot wrote:
    When doing Connect to Server as an LDAP user their home folder is no longer available as a mountable volume. The share that holds all user home folders IS available so that's not the end of the world.
    There are so many ways of configuring home directories that this can't be answered without more information.
    For example, are you using automount to mount the user's home directory when they log in?
    or do the clients mount a static mount and their Open Directory record just includes a link to the (mounted) home directory?
    We are using automounts to get users their home folders. And when logging in at a terminal with an LDAP account you do get into your account as expected. It's only Go -> Connect to Server that won't give the home folder as a sharepoint and the web service for user sites that we agree are most likely tied together.
    I have both userdir_module and apple_userdir_module enabled at the moment, although when I tried just one or the other I was getting an Object does not exist rather than the permission error.
    I think the key to solving this is in the console log entries httpd -> error_log:
    errors before posting:
    [Tue Aug 24 11:38:48 2010] [error] [client 10.2.104.16] File does not exist: /Library/WebServer/Documents/~walshd
    [Mon Apr 25 09:11:22 2011] [error] [client 10.2.104.16] (62)Too many levels of symbolic links: access to /~walshd failed
    [Mon Apr 25 12:39:39 2011] [error] [client 10.2.104.16] (62)Too many levels of symbolic links: access to /~walshd failed
    [Mon Apr 25 14:40:17 2011] [error] [client 10.2.104.16] (62)Too many levels of symbolic links: access to /~walshd failed
    [Wed Apr 27 06:57:03 2011] [error] [client 10.2.104.16] (62)Too many levels of symbolic links: access to /~walshd failed
    [Wed Apr 27 06:57:17 2011] [error] [client 10.2.104.16] (62)Too many levels of symbolic links: access to /~walshd failed
    with userdir_module disabled and apple_userdir_module enabled:
    [Wed Apr 27 06:57:32 2011] [error] [client 10.2.104.16] File does not exist: /Library/WebServer/Documents/~walshd
    [Wed Apr 27 06:57:34 2011] [error] [client 10.2.104.16] File does not exist: /Library/WebServer/Documents/~walshd
    [Wed Apr 27 06:57:35 2011] [error] [client 10.2.104.16] File does not exist: /Library/WebServer/Documents/~walshd
    [Wed Apr 27 06:57:49 2011] [error] [client 10.2.104.16] File does not exist: /Library/WebServer/Documents/~walshd
    [Wed Apr 27 06:57:50 2011] [error] [client 10.2.104.16] File does not exist: /Library/WebServer/Documents/~walshd
    with userdir_module enabled and apple_userdir_module disabled:
    [Wed Apr 27 06:58:02 2011] [error] [client 10.2.104.16] File does not exist: /Network/Servers/staff.lsrhs.net/Volumes/Staff/Home/walshd
    [Wed Apr 27 06:58:03 2011] [error] [client 10.2.104.16] File does not exist: /Network/Servers/staff.lsrhs.net/Volumes/Staff/Home/walshd
    [Wed Apr 27 06:58:04 2011] [error] [client 10.2.104.16] File does not exist: /Network/Servers/staff.lsrhs.net/Volumes/Staff/Home/walshd
    with both enabled again:
    [Wed Apr 27 06:58:22 2011] [error] [client 10.2.104.16] (62)Too many levels of symbolic links: access to /~walshd failed
    The strangest thing about this issue is that it happened  after I applied a bunch of updates last week:
    2010-04-22 12:52:17 -0400: Installed "Remote Desktop Client Update" (3.3.2)
    2010-04-22 12:52:23 -0400: Installed "AirPort Base Station Update 2010-001" (5.5.1)
    2010-04-22 12:52:39 -0400: Installed "QuickTime" (7.6.6)
    2010-04-22 12:52:41 -0400: Installed "Xserve EFI Firmware Update" (1.1)
    2010-04-22 12:52:44 -0400: Installed "iLife Support" (9.0.4)
    2010-04-22 12:52:59 -0400: Installed "Java for Mac OS X 10.5 Update 5" (1.0)
    2010-04-22 12:53:21 -0400: Installed "iTunes" (9.1)
    2010-04-22 12:54:31 -0400: Installed "Security Update 2010-003" (1.0)
    2010-04-22 12:55:16 -0400: Installed "Safari" (4.0.5)
    2010-04-22 13:15:22 -0400: Installed "Java for Mac OS X 10.5 Update 6" (1.0)
    Could any of these have broken the home directories sharepoints or is this just a huge coincidence?

  • Portable home directory sync issue after computer change

    I have a client who has changed one of his laptops to a new machine and now his portible home directory sync is not working. He puts in the password but it says the server is not found. I have confirmed that the correct server address is listed in the preferances. It used to say it was a incorrect password and i have also verified that the correct pass is listed in workgroup manager for his profile. now no matter what we put in it says server unable to be found. another strange thing i have noticed is the when i went in to the mobility settings on his account in workgroup manager it was all grayed out until i altered some of the setting and now it is not greyed out anymore and it wont go back to being greyed out.

    hi there, i am having the exact same issue with some portable accounts. we are running 10.5.4 server and 10.5.4 clients.
    i have noticed rogue ACLS appearing now in server admin for leopard, as described in a previous post.
    User = Everyone, Type = Deny, Permission = Custom, Applies To = This folder, All descendants.
    strangely, some of our users have the rogue ACL and some don't.
    even after deleting the ACL for the user, portable home syncing still does not work.
    on the client it goes through the process and the blue bar shows you it checking folders and seemingly updating. the give away for me is following the apparently successful sync, when you click on the mobile directory icon in the menu bar the date has not updated and clearly upon checking with the network account, new data has not synced.
    any ideas would be great... until now i have had to manually drag data from the client to the network folder by mounting the network folder over afp, then wipe the client and recreate the portable account... even then i am not sure how long syncing has been successful, though that has seemed to fix things.
    i am not sure if something is breaking in the user's library on the portable account?
    any insight would be most welcome.

  • Mount Home Directory when logged in locally

    I want an application that would ask for the users name and then mount and open their home directory. This will be used when a user is logged on locally and not via OD/AD. Can automator do this or should i stick to apple script. Right now my apple script looks like this.
    to getusername()
    display dialog "Enter your username:" default answer ""
    set username to text returned of result
    return {username}
    end getusername
    to getuserpwd()
    display dialog "Enter your password:" default answer "" with hidden answer
    set userpwd to text returned of result
    return {userpwd}
    end getuserpwd
    set username to getusername()
    set userpass to getuserpwd()
    tell application "Finder"
    if (username > 161000 and username < 169999) then
    open location "afp://" & username & ":" & userpass & "@wwrsdod2.wwrsd.org/HomeDirs/GY2016/" & username
    else
    open location "afp://" & username & ":" & userpass & "@wwrsdod2.wwrsd.org/HomeDirs/GY2015/" & username
    end if
    end tell
    But the finder opens up to the top level of the share and not the user's folder. Anyone help me out.
    Thanks

    Hi Tejas,
    usually when you see the server invalid (by the Yellow triangle on each repositories) means that your MDM server and MDM Clients have different version. Please, checks the version and be sure these are the same, or server version is more recent of the clients one.
    Take a look to this, may be it help:
    Re: Error Initialising database engine
    Bye,
    Vito

Maybe you are looking for

  • Discoverer 4i Plus returns no data when using views with db link references

    I am using Discoverer 41 Plus to view reports online. When I create a worksheet based on a view, that only references local tables, everything is OK and Disco plus shows the output OK. When I create a worksheet based on a view, that references a Data

  • Why I can't export a single frame from my composition?

    I try to export a single frame from the cavas but motion just did nothing when I click on export. Is there something wrong with my motion setup? I have trashed the motion's plist couple times already but still having the same issue. I can't even save

  • How to created an cost element group structure from P&L FSV

    Hi All, My client has changed his financial statement version and I have to change the cost element group structure according to the new profit and lost structure of this new FSV. Do you know any transaction to do this automatically?. For example the

  • Adaptive WebService Import Error

    Dear All, I am new to webservices concept. I am trying to import a webservice from local file system using Model --> Create --> Import Adaptive Web Service... When I select Local File Syatm or URL option and if i click on browse then select the WSDL

  • Deleted files make Time Machine backup larger

    This seems curious to me. I deleted a few large files from my computer. I noticed later that TM was taking a long time to back up. Now, the available space on my TM disk is much smaller. I'm sure there's some logic to this, but I can't figure it out.