Re: user home directory?
Re: user home directory?
- Subject: Re: user home directory?
- From: Doug Brown <email@hidden>
- Date: Thu, 13 Oct 2011 15:02:46 +1000
On 13 October 2011 08:18, danchik
<email@hidden> wrote:
I had similar issue with trying to determine the user that started the installer that has to install with admin priviliges. After user elevates it, the post script launched another program to do additional steps, but the program is not able to expand tildas in path to the correct user. How does one get the user (or user home path) that started the installer once the installer has been elevated outside of the installer itself?
This will give you the current gui user's username and their home directory path:
currentguiusername=`ls -l /dev/console | awk '{print $3}'`
currentguiuserhomedirectory=`dscl localhost read /Local/Default/Users/$currentguiusername NFSHomeDirectory | awk '{print $2}'`
Cheers,
Doug
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden