AD Bind Issues Sierra and Removing Sleep

ccsshelpdesk
New Contributor III

We have been forced early to upgrade to Sierra on some new iMacs due to they don't support El Captain, and i have managed to get everything working except two issues.

Firstly we do use AD bind with mobile accounts to get rid of the Library Errors, which is working fine.
It map's the UNC path fine and mounts the root to the desktop but no longer puts the Documents on the right side of the dock like it does in El capatain which i need to get resolved.
I have tried some scripts to re-map the home folder but to no avail. Is their an easier way to re-create this shortcut. Its made a bit more difficult as the student home folders are //gc-server/student-home/33208/Documents/ 33208 being the id of the student domain username. So i may have to use the $3 to get the logged in username.
It looks like sierra is mapping this correctly but just not applying the shortcut to Documents folder in the dock.
I map another share via a config script and this is working fine.

The other issue i have is stopping the iMacs going into sleep.
I have rolled the following to the PowerManagment.plist
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.PowerManagement SystemPowerSettings -dict SleepDisabled -bool NO

Which does take effect and does remove the sleep option from the menu, but the iMacs continue to somehow go into sleep. But its a bit hit and miss as sometimes it does disable if from the login page also, but then seems to come back and turns back on.
But i have noticed that their are other PowerManagement.plist files within preferences with long random numbers at then end also within the folder.
Is their a sure fire way to disable Sleep permanently in any way.

Any Help would be greatly appreciated

9 REPLIES 9

ryan_ball
Valued Contributor

This will take care of your sleep issue:

pmset -a sleep 0

ccsshelpdesk
New Contributor III

Cheers for the info i have tried that along with some other pmset commands for the displaysleep settings with very odd results.

If i apply these settings manually on the iMac from terminal they seem to set, but upon a reboot they revert back again, also if i run pmset -g the settings shown in there are totally diffrent that the ones set manually via pmset

Like ihave set the above pmset -a sleep 50 as a test, then Run pmset -g to check and get sleep 1
And run pmset -a displaysleep 50 and in pmset -g get displaysleep 10

Within the com.apple.PowerManagemen.plist the pmset settings are showing correctly.

But if i restart the iMac these get reset back to other values, but no mater what i change that takes effect in the .plist file these dont stay and never appear changed in pmset -g

As all im after doing in stopping them sleeping , and turn off display after 30 mins.
But this is proving very difficult

ryan_ball
Valued Contributor

Do you have a configuration profile that is setting energy saver settings?

ccsshelpdesk
New Contributor III

No i have disabled the old config profile for sierra machines.
What i have noticed that even tho the settings are going into the plist file
If i view pmset -g or -g live it has the incorrect settings, ok thats odd...

But if i view pmset -g custom this has the correct power settings so im a bit closer, but have no ide how to get the -g custom to be the live power settings

ccsshelpdesk
New Contributor III

I have set this again using two fresh imaged iMacs with the same polices (set to run the script at startup and checkin) and the script I'm using is this:

defaults write /Library/Preferences/com.apple.PowerManagement SystemPowerSettings -dict SleepDisabled -bool YES
pmset -a sleep 0
pmset -a powernap 0
pmset -a displaysleep 30

bzuckrow
New Contributor III

I am not sure I am following you on the Documents/Home folder mapping but this works for us in High Sierra (because there are no login hooks any more). We use Mac and Windows computers and this maps the Home share for users on both.

We populate the Home folder path in AD - Profile>Home> Connect drive letter To: path - then in Directory Bindings profile select Use Network path from AD to derive network home location. This will require a unbind/bind or you can sometimes get away with just a bind. This puts the globe at the end of the dock.

We set the path for all users at once by selecting all - right click then in the profile path enter servershare%username%. We also use Windows file servers.

I tried scripting the mapping first and couldn't come up with a way to do it consistently - trouble getting the username to read in and authenticate to the file share - would be interested to see what your script looks like if you don't mind sharing.

bzuckrow
New Contributor III

We had a weird circumstance with our sleep timer payload. We started on jss 9.7 3 years ago and always upgraded to newest. Around 9.8-9.9 we ran into a bug where another payload was resetting the sleep time payload in the background. A Jamf engineer found it by looking at the .xml's of all my profiles and found the setting in an unrelated place. He re-created my profile on his JSS and exported for me - his did not trigger this "bug" and I have been using it ever since.

I like the solution suggested here using pmset best.

Nix4Life
Valued Contributor

Have you though about caffeinating the iMacs.

ccsshelpdesk
New Contributor III

I have pondered with the option of using that but still wanted screens to go off and screensaver.
Just cannot work out why the power settings keep getting re-set when the macs are re-booted.