Posted on 05-03-2013 07:04 AM
Hey, guys:
I've set up a Mobility Configuration Profile to "Create mobile account when user logs in to network account" for our Open Directory (10.6.8). Of course, being a User Level profile, this doesn't get applied until after first login. So the first time we log in with a network user it creates a network account, then the Configuration Profile gets applied, so the next time we login, a proper mobile account gets created. This is okay, but is there any way to get the mobile account on first login?
Lemme know your thoughts!
Michael
Solved! Go to Solution.
Posted on 05-31-2013 05:44 AM
Sorry I just noticed your reply....
Here is the EA:
#!/bin/sh
liu=$(who | grep console | awk '{print $1}')
la=$(ls /Users | grep $liu)
if [ "$liu" = "$la" ]; then
echo "<result>Mobile</result>"
else
echo "<result>Network</result>"
fi
and here is the script:
#!/bin/sh
liuser=$(who | grep console | awk '{print $1}')
/System/Library/CoreServices/ManagedClient.app/Contents/Resources/createmobileaccount -n $liuser
I'm abandoning hopes of using configuration profiles for mobility this year and reverting back to using 10.6.8 OD MCX.
Posted on 05-03-2013 11:44 AM
I use a script with a startup trigger with the command below. This works very well with 10.7.x, not sure about 10.6.x
dsconfigad -mobile enable ; dsconfigad -mobileconfirm disable
Posted on 05-03-2013 12:31 PM
Do you mean dsconfigldap as I'm using OD not AD?
Posted on 05-07-2013 06:11 AM
I've had trouble with this also. I'm also using OD. Even after a single login I can't reliably be sure that a 'mobile' account will be created. I've seen people have to log in and out multiple times before their mobile account takes hold. What I eventually did this year(I'm hoping to come up with something new this summer) is build an extension attribute to determine who was using a network account. I created a smart group based on that EA then ran a script scoped to that group that forced the creation of the mobile account. I'd be happy to share the EA and script if anyone is interested.
Posted on 05-07-2013 01:30 PM
I would gladly take such an EA and such a script.
Posted on 05-31-2013 05:44 AM
Sorry I just noticed your reply....
Here is the EA:
#!/bin/sh
liu=$(who | grep console | awk '{print $1}')
la=$(ls /Users | grep $liu)
if [ "$liu" = "$la" ]; then
echo "<result>Mobile</result>"
else
echo "<result>Network</result>"
fi
and here is the script:
#!/bin/sh
liuser=$(who | grep console | awk '{print $1}')
/System/Library/CoreServices/ManagedClient.app/Contents/Resources/createmobileaccount -n $liuser
I'm abandoning hopes of using configuration profiles for mobility this year and reverting back to using 10.6.8 OD MCX.
Posted on 05-31-2013 05:47 AM
OP delivers. Thanks a million.
Posted on 06-27-2013 01:27 PM
Justin,
I am using your script but get an error I do not understand:
Running script createMobileUser.sh...
Script exit code: 0
Script result: 2013-06-27 13:29:15.298 createmobileaccount[975:707] MCXCCacheMCXRecordAndGraph(): vproc_swap_integer(NULL, VPROC_GSK_PERUSER_SUSPEND, &(uid=1027), NULL) failed
2013-06-27 13:29:16.426 createmobileaccount[975:707] MCXCCacheMCXRecordAndGraph(): vproc_swap_integer(NULL, VPROC_GSK_PERUSER_RESUME, &(uid=1027), NULL) failed
createmobileaccount built Apr 27 2013 02:50:29
Any ideas?