Launch or Re-loading Plist ono login

NYBGIT
New Contributor III

Hi Guys,

I'm currently using a plist to create network mappings for users in each department. This works flawless on first login but im running into an issue.

If the machine goes to sleep with the logged in user it seems the network card goes to sleep as well. Causing the drives to unmount. When the user comes back and enters their credential the shares are no longer available. Is there are a way to launch managed plist on every login so that the shares can be mapped. I'd also like to time the launch to give the network card time to be available.

I've used Macmule's route for mapping which works but im also having inconsistencies where the mappings do not occur on login. i found the plist to be a cleaner route so i was wondering if theres a solution to my issue

4 REPLIES 4

mm2270
Legendary Contributor III

Can you clarify what you mean exactly by a plist? When I first read your post I assumed you meant a LaunchAgent plist, but then after looking at it again I see that you don't specifically mention that, so I'm not sure if you mean just a literal plist in the user's home folder, or a plist used for a Config Profile, or a LaunchAgent. Maybe you can clarify that and then we can see what's possible.

NYBGIT
New Contributor III

@mm2270

i am using a custom setting with domain "com.apple.loginitems.managed.plist" to complete the mapping for shares. I've converted the config profile for login items to a plist since Jamf login items aren't working as a config profile.

The values im using are {AutoLaunchedApplicationDictionary-managed=[{Hide=false, Path=, AuthenticateAsLoginUserShortName=true, URL=smb://server/sub-folder}, {Hide=false, Path=, AuthenticateAsLoginUserShortName=true, URL=smb://server/sub-folder}]}

This is being applied as a user-level config.

mm2270
Legendary Contributor III

Ah, so it's a custom Config Profile, and the profile applies at login, but then not again after sleep/wake. Which makes sense.
That being the case, I'm actually not sure how you can get this to kick in again. If it was something like a script being run by a LaunchAgent, that would be possible by using a WatchPath and watching for network state changes.

With a User level Config Profile, hmm, not really sure on a good approach here. The only thing I can recommend would be to create a small "app" that runs a script and tries to mount shares again, drop that into user's Docks and instruct them to click it if they need to (re)mount any disconnected shares.

I wish I had a better answer, but at the moment at least I don't. Maybe someone else will be able to come up with something better.

NYBGIT
New Contributor III

@mm2270

Do we know how Plist are applied in general. Something has to trigger that setting on the first login. if i can figure what command does this this may be an answer as well.