Skip navigation

unix security and privacy setting unix command via apple remote desktop

982 Views 2 Replies Latest reply: Feb 21, 2013 10:10 PM by TeenTitan RSS
James Rothschild Level 1 Level 1 (55 points)
Currently Being Moderated
Feb 15, 2013 2:40 AM

Could someone guide me on the unix command to set System Preferemces Security & Privacy to xx minutes [see screenshot please] via Apple Remote Desktop.

 

https://dl.dropbox.com/u/5485939/osx_screenshots/sys%20pref%20security%20privacy .png

 

Thank you,

All of them, Mac OS X (10.6.4), Some PC's too, forgive me please!...
  • TeenTitan Level 4 Level 4 (2,410 points)

    Pereference tend to be stored for the computer as a whole

    /Library/Preferences/

     

    or specifcally for the user

    /Users/USERNAME/Library/Preferences/

     

    well when I set required password for XX minutes... I see that

    /Users/USERNAME/Library/Preferences/com.apple.screensaver.plist modfication date & time changes to the current time & date... hMMM maybe the setting we want is stored here? Can we test this?

     

    If I check require password and then do the terminal command:

    defaults read ~/Library/Preferences/com.apple.screensaver

     

    I see

    {

        askForPassword = 1;

        askForPasswordDelay = 0;

        tokenRemovalAction = 0;

    }

     

    turn it off

    run the terminal command;

    defaults read ~/Library/Preferences/com.apple.screensaver

     

    I see:

    {

        askForPassword = 0;

        askForPasswordDelay = 0;

        tokenRemovalAction = 0;

    }

     

     

    so I can turn it on with

    defaults write ~/Library/Preferences/com.apple.screensaver askForPassword -bool TRUE

     

    and I can turn it off with

    defaults write ~/Library/Preferences/com.apple.screensaver askForPassword -bool FALSE

     

    So if a user is logged into a computer. I could send unix command as current console user.

    defaults write ~/Library/Preferences/com.apple.screensaver askForPassword -bool TRUE

     

    BUT what if the user is logged out? or there are more then one user on the computer?

    then I could run unix command as user root and send

    defaults write /Users/USERNAME/Library/Preferences/com.apple.screensaver askForPassword -bool TRUE

    (replace USERNAME with the user's short name.)

     

    but what if I don't know the user name? or names

    send unix command as root

    ls -al /Users/

     

    get back a list of folders

    bob

    surely

    shares

     

    and then do

    send unix command as root

    defaults write /Users/bob/Library/Preferences/com.apple.screensaver askForPassword -bool TRUE

    defaults write /Users/surely/Library/Preferences/com.apple.screensaver askForPassword -bool TRUE

     

     

    you could also do some thing like

    defaults write ~/Library/Preferences/com.apple.screensaver askForPasswordDelay -integer 5

    if you want to change the period of time to lock to 5 seconds

    or

    defaults write ~/Library/Preferences/com.apple.screensaver askForPasswordDelay -integer 900

     

    (900 seconds  / 60 seconds = 15 minutes)

  • TeenTitan Level 4 Level 4 (2,410 points)

    in a large deployment ushally this kind of setting would be configured using MCX, shellscript, or device profiles. This could be done via an open directory, jamf, modified acive directory, absolute, extra.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.