launchd question

Axel Luttgens luttgens at fusl.ac.be
Wed Feb 28 03:46:24 PST 2007


On 28/02/07 10:26, Christopher Hunt wrote:

> I've just made a discovery that I think is worth sharing.
>
> Firstly I have a user that can administer the computer (user A) and  
> one that can't (user B). If I issue a launchctl start from the  
> command line for user A


Without sudo? Is user A the root user?

> then the osascript -e <command> works! Of  course this is not the case 
> for user B.
>
> However if I perform a "launchd bash", load the plists and the  
> perform the launchctl start (all for user B)s then all is well!
>
> I'm confused... if things work under launchd bash then why shouldn't  
> they outside of that shell?


With "launchd bash", you have created a *second* instance of launchd, 
running with your user privileges.
By using launchctl (without sudo), you are then implicitely targeting 
that second instance, upon which you have full control (loading 
services, starting services...).

HTH,
Axel


More information about the MacOSX-admin mailing list