How do you troubleshoot launch agents?

I work for an educational instution and have been tasked with writing a process that will map all of a users networkshares/homeshares when they login to their Mac's. One big sticking point we've had in the past is that all our shares are DFS based. What this meant for 10.6 is that instead of mapping things using the DFS path, we had to use the actual servername of where those shares were hosted. Because 10.7.4 now supports DFS there is a big push to start having an automated process handle this.
I've learned a lot from the process, but one of my problems is the launch agent.
So here is what I have currently:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
            <key>Label</key>
            <string>com.domain.mapdrive.windowsshares</string>
            <key>ProgramArguments</key>
            <array>
                        <string>/bin/sh</string>
                        <string>-c</string>
                        <string>/bin/mkdir /Volumes/netlogon; /sbin/mount -o nobrowse -t smbfs //domain.edu/netlogon /Volumes/netlogon</string>
            </array>
            <key>RunAtLoad</key>
            <true/>
</dict>
</plist>
Currently in terminal when I type the above commands it works fine:
/bin/mkdir /Volumes/netlogon
/sbin/mount -o nobrowse -t smbfs //domain.edu/netlogon /Volumes/netlogon
However, when I try to run the same command via the launch agent I get the following in Console at login:
com.domain.mapdrive.windowsshares: mount_smbfs: server rejected the connection: Authentication error
com.apple.launchd.peruser.2126486968: (com.domain.mapdrive.windowsshares[2876]) Exited with code: 77
I looked at the perms a bit and they were oginally:
computer:LaunchAgents user$ ls -l /Users/user/Library/LaunchAgents/com.domain.mapdrive.windowsshares.plist
-rw-------  1 user  Domain\Domain Users  252 Jul 16 11:02 /Users/user/Library/LaunchAgents/com.domain.mapdrive.windowsshares.plist
It looks fine in the sense that the user owners the file. I tried modifying the perms a bit to be more like a script
computer:LaunchAgents user$ /bin/chmod 755
But still got the same error in terminal. My best guess is that the launch agent isnt running in the user's context, but I'm trying to figure out how to find what context it is running under to confirm or deny that. Any help?

Why so testy? Luckily for you, I'm a forgiving fellow. I will give it one last try and then leave you alone.
You have a fundamental problem here. In order to access these shared resources, your users must authenticate. Windows authentication is designed to work with Active Directory. If your network isn't doing that, then you need to take it up with your IT department.
If your Active Directory isn't working properly, you can roll your own solution in any number of ways, but the users are always going to have to authenticate. You would have to use something like NFS to avoid that.
I suggest looking at your environment in both your normal login session and comparing that to the launchd environment. They are always different.
Here are a couple of support articles that may give you some pointers:
http://support.apple.com/kb/ht4794
http://developer.apple.com/library/mac/#technotes/tn2083/_index.html

Similar Messages

  • How do you register an agent of on 11.2 DB to run remote jobs on another ?

    There are examples available showing how to install a remote agent on a host that doesnt have an Oracle database (using the gateway CD in 11.1 or the Oracle Client in 11.2) and from reading the documentation, it suggests you only need to install the remote agent if there is not an Oracle database on the host. If I have two Oracle databases and want to run remote jobs from DBMS_SCHEDULER on host A against data on host B, how can i register the agent as i cant find any examples that do this.
    With the remote agent installed, there are schagent either in unix or windows but i cant find this in the $ORACLE_HOME/bin of an 11.2 Enterprise install. I've run the prvtrsch.sql script as SYS and it's created the REMOTE_SCHEDULER_AGENT user and objects (which i think might be the equivalent of running schagent on the remote client) but then when i want to register the agent on the calling Oracle database, i dont know what the agent name is to specify in the CREATE_SCHEDULER_DESTINATION call.
    I've added the TNS entries for both directions but just dont have enough information to find the missing bit that lets me connect them.
    Any help appreciated, or just some pointer to know if I am in the right direction would be great
    Thanks

    Hi Ronald
    I have your book which has been very useful in other areas I have been investigating on DBMS_SCHEDULER ( I certainly recommend it to anyone doing any serious work on DBMS_SCHEDULER) but it's not in there either - I've read the chapter ''Getting out of the database' several times and whilst it goes into great detail on how to install the remote agent on a machine without a database, I could only find a brief mention of running an agent in the database starting on page 113 where it talks about 'preparing the database for remote agent usage'.
    I've done these things on the second database but the later part of the chapter is back to running jobs on a machine without Oracle installed and use of schagent which doesn't exist in in the $ORACLE_HOME/bin on a machine that has Oracle installed so I am stuck on how to proceed.
    You also mention the enhancement request so would be interested to know what happened with this ?
    The first thing that comes to my mind when a registration has been done is: "How
    can I check this?" Unfortunately, there appears to be no way to check the status of the
    agent's registration—not even in the database. It would be very convenient to have
    an Oracle view that gives an oversight of which agents are talking with the database.
    I filed an enhancement request (7462577) for this. So with a little luck, we can check
    the status of remote agents in the near future.
    I figure if I have the name of the agent, I can use it in the CREATE_DATABASE_DESTINATION call on my calling database but I cant find the name anywhere. In SQL Developer on the SQL table of create destination, it shows this as being SYS."" and inserts whatever you select from a dropdown list but I don't know how to get any values into the dropdown so possibly the registration wasn't complete but it has created the database objects in the schema and I got no errors when running it.
    Any advise on how to proceed welcome and perhaps it can be added as an addition to the next version of the book.
    Regards
    Trevor

  • How do you troubleshoot a crashed IPod nano 7?

    My 7th gen IPod Nano has crashed!  It won't turn on and isn't recognized at all by Mac.  Doesn't acknowledge charging either...  Help!

    Hey alohainthai!
    Here is a link that will help you troubleshoot this issue with your iPod nano:
    Apple - Support - iPod nano - iTunes Troubleshooting Assistant
    https://www.apple.com/support/ipodnano/assistant/itunes/
    Thanks for coming to the Apple Support Communities!
    Regards,
    Braden

  • How would you troubleshoot this? Sharepoint 2013 - masterpage loses all styles on preview and publish

    Here is what happened.
    I had a fully functioning masterpage
    I copy the 'html' masterpage by using 'copy and paste'
    When I preview this masterpage, this is what I see:
    It looks as though somehow all of the styling has been stripped out. The content for the most part is still there.
    I tried:
    relinking the stylesheets and still having a problem
    Can anyone suggest how to troubleshoot this? Could it possibly be an ASP.NET conflict? I know that on any given masterpage a webpart ID cannot be duplicated and generally other IDs should also not be duplicated.

    Hi,
    According to your post, my understanding is that you had an issue about the Master page.
    What did you mean “copy the ‘html’ master page by using ‘copy and paste’”?
    Did you mean you copy and paste the html master page in SharePoint Designer?
    If so, you can preview the default html master to check whether it works.
    Then you can copy a new html master page, then write your own function step by step to check whether it works.
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How do you troubleshoot Caching Errors in Java Runtime Environment?

    I have run into Caching Errors while using JRE (versions 1.4.2 and 1.5.0, various updates) using Windows XP and IE6. The error screen has the title Error - Cache and appears when trying to download JAR files through a secure HTTP connection. The error reads: "Caching Error. Unable to store or update files in the cache." In the details box, the first line can differ:
    java.net.SocketException: Connection reset
    java.net.UnknownHostException: [followed by a URL]
    java.net.ConnectException: Connection timed out: connect
    I looked in the Java Control Panel to make sure that the "Enable caching" box is checked, and removed the proxy settings in IE. The user has sufficient rights on the computer to download files.
    How does one go about troubleshooting these caching errors? Is there a reference document available? I could not find anything on the Sun site or anywhere else.
    Any help would be very much appreciated.

    I deleted c:\Documents and Settings\<user>\Application Data\Sun (the same as in Java Control Panel->Temporary Internet Files->Settings, but at higher level). After that and some machine reboots it worked.

  • HT1363 How do you troubleshoot a white screen on ipod 4th gen?

    My ipod 4th gen has a white screen. None of the troubleshooting steps will correct it. Anyone have any recommendations what to do next?

    A restore of the device in iTunes usually rules out any possibility of a software glitch as it reloads the iPod with a fresh version of the iPod's software.  One last thing you can try doing is letting the iPod's battery fully drain. Then charge it back up and restore in iTunes once more.
    Otherwise, it's likely a hardware issue with the iPod's LCD display or its connection to the iPod's logic board.  You'll need to pay to have your iPod serviced/replaced either by Apple or a third party repair service.
    Here is Apple's pricing: http://www.apple.com/support/ipod/service/prices/
    B-rock

  • How do you troubleshoot a scheduled snapshot

    Hello, I have a ton of reports that have a snapshot taken on the 2nd day of the month. Has worked fine until this past weekend when the snapshots did not happen. There is nothing I see in SSRS that explains it. The schedule is still there. Is there a way
    to find the root cause of why the snapshots didn't fire? The server and database were functioning at the time.

    Hi cmunkres,
    As JJordheim posted earlier, please check if the schedule is work well in the report server. In SSRS, we can open the Schedule table in the ReportServer database to check the schedule. And the SnapshotData table is record the data about the snapshot.
    Reference: Report Server Database
    Alternatively, we can check the log file to fine the root case. In SSRS 2012, the log file default location is:
    C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\LogFiles
    Could you please post the error log? It is benefit for us to do further analysis.
    Hope this helps.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • How do you troubleshoot Flash animations that wont load?

    I've recently switched to Safari 3.1 from Firefox and am finding occasional pages with flash animations that wont play
    (currently trying to get to "Product tour" on this page: http://www.logitech.com/index.cfm/remotes/universal_remotes/devices/3898&cl=us,e n )
    I just get a blank frame. I've confirmed I have the latest Adobe Flash plugin installed (9,0,115,0)
    Just curious if there is anything to do, or if this is just a funky, Safari-unfriendly page.
    Thanks.

    Same result here.
    if this is just a funky, Safari-unfriendly page
    Probably! But two things:
    It seems to be their Javascript that doesn't work.
    Secondly (may be worth trying):
    Some Leopard users have mentioned that the latest Flash Player (v.9.0.115.0) conflicts with Leopard, and that they have needed to revert to v. 9.0.47. This can be downloaded from here:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14266&sliceId=1

  • How do you troubleshoot Firefox on iMac?

    '''Email does not display right'''

    I tried that (command-Shift F) to go from full screen and it really messed things up.

  • How do you deal with separate shifts/phones/lines/etc?

    I'm not entirely sure of the exact question i'm trying to ask, but essentially how do you handle phone/Agent logins where the agents are not at dedicated desks?  Meaning, they may not sit at the same location every day, or there may be other shifts that sit at that location when they're gone.
    What do you do with their personal extensions
    What do you do with the IPCC Extension
    Maybe i'm just trying to overthink this and it's simpler than i think.
    What does everyone else do?
    JM

    Hi
    Yes, they would log into the phone and then the CAD software seperately.
    A seperate specific extension for IPCC is optional; lots of my customers just have a single, personal extension that doubles as their IPCC extension without any problems.
    The only mandatory bits are that each agent must have a unique, non shared extension that is set on their 'end user' page as their IPCC Extension.
    So
    - the physical phones would have non-user-specific 'logged out' numbers
    - each user would have an EM profile that has a unique extension (and optional personal extension if you prefer)
    - each user would have that unique/ipcc extension set as the IPCC extension on their user config
    - they log on to the phone, and their extension(s) appear on the phone in place of the 'logged out' number
    - they can then log into the Agent software
    Regards
    Aaron
    Please rate helpful posts and mark answered questions that you've got a satisfactory response from to help identify useful content in the forums...
    https://supportforums.cisco.com/docs/DOC-6212

  • How do you launch apps on your device when it keeps saying my device was not known any advice?

    How do you launch apps from your device mine being a Macbook pro?

    Hi TammyPruett,
    I apologize, I'm a bit unclear on the exact issue you are describing. If you are having issues launching applications on your Mac, you may find the following articles helpful:
    Mac OS X: How to troubleshoot a software issue
    http://support.apple.com/kb/ht1199
    Apple Support: Troubleshooting the Mac App Store
    http://support.apple.com/kb/ts3624
    Regards,
    - Brenden

  • I just purchased a software upgrade.  I received an e-mail that says, "To install your software, you simply launch the Mac App Store, click "Redeem"• found under Quick Links and enter your content code(s)." How do I do this??

    I just purchased a software upgrade to OSX Lion.  I received an e-mail that says, "To install your software, you simply launch the Mac App Store, click "Redeem"• found under Quick Links and enter your content code(s).  How do I "launch the Mac App Store?"

    Assuming you are running OS X 10.6.6 or later (10.7.x Lion, 10.8.x Mountain Lion or 10.9.x Mavericks), go to the Apple Menu (top left-hand corner of the screen)>App Store and it should become clear from there.

  • HT201272 My You Tube launcher app has disappeared from the home page and can't be found. How do I reinstate it?

    The You Tube launcher app has disappeared from my home screen. How can I reinstate it?

    The YouTube app is not included in iOS 6. You will either need to try one of the YouTube apps from the store (there is an iPhone optimised app from google, and other people have said that they are working on an iPad version and there is Jasmine), or try accessing the mobile version via Safari : http://m.youtube.com (you can create a home screen shortcut for the site)

  • How to view PDF documents because say you must launch adobe reader and accept the end user license

    I have a question about to display the PDF documents, could you tell me how can I display it?, I have this message that say before viewing PDF documents in this browser you must launch Adobe Reader and accept the End User License Agreement, then Quit and relaunch the browser

    I've got the same issue and I want to use Preview to read pdfs on Safari. At some point I had Acrobat Reader installed, but deleted it and everything associated with it. However no matter what, I get: "Before launching pdf documents in this browser you must launch Adobe Reader and accept the end user license agreement, then quit and relaunch the browser."
    This means I am forced to use Reader, when I don't want to. There seems no way to default to Preview to read pdfs on Safari, even after deleting Adobe Reader completely.
    Anyone have a clue how to fix this?

  • How do you limit the content of Launch pad screens

    How do you limit the content of Launch pad screens - mine is cluttered with many applications - which are all valid - but many are so raely used they are causing me to have two screes - I want one screen possibly half filled. Can anybody help...

    I believe you need to manually delete them one at a time..
    Are the emails from an IMAP account(s)

Maybe you are looking for

  • App store won't let me download apps but wont let me reove billing info for FREE app downloads.

    I cannot download apps anymore. Free apps. I used a card of mine that had a few dollars on it to purchase two games that were 99 cents. I had close to three dollars. But now I cannot update or download my apps thanks to a SEEMINGLY bad billing accoun

  • VARRAY retrieval via MSVisual C++ ADO

    CREATE TYPE ENAMELIST AS VARRAY(20) OF VARCHAR2(30); CREATE TABLE department ( dept_id NUMBER(2), ENAMES ENAMELIST); First, can a VARRAY data type be passed as a parameter in a stored procedure call ? Second, need C++ code sample of retreiving the VA

  • Field data change-User exit in PA30 & PA40

    Hi All, I wants to execute an rfc with following data, whenever changes maid in following fields. P9005/ZFIELD,    PA0002/NACHN, PA0002/VORNA,  PA0002/CNAME, PA0000/STAT2,   PA0041/DAR01,  PA0041/DAR02,   PA0041/DAR04, PA0008/TRFGR,  PA0008/TRFST,  P

  • Add a font to report builder?

    Is it possible to add a new font to report builder 3.0? I'm new to this and trying to create a report that uses the font Whitney Book (or one similar to it) but I can't figure out how to add it to the report builder. Thanks in advanced!

  • Problems with 10.8.5 update

    After 10.8.5 update my late 2012 Imac takes twice as long to boot. After it finally does boot I have no mouse or keyboard input for about 4 minutes. I can't boot into safe mode since I have no keyboard input to enter my password. I can get my mouse a