Solved

Mac Login page

Posted on 2013-10-23
2
307 Views
Last Modified: 2013-10-31
Hi,

Is there a way to set the osx 10.8 login page to require a username and password using a script? I know I can do it via the system preferences but I have mac labs which are already imaged and wanted to push out a script that will change this.

Any help would be greatly appreciated!
0
Comment
Question by:dcirona86
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 53

Accepted Solution

by:
strung earned 500 total points
ID: 39595974
0
 
LVL 40

Expert Comment

by:Eoin OSullivan
ID: 39596434
Can you tell us more about how your lab is configured?
What version of OSX are the computers running?
Do you have OSX Server running on a computer?
Is there any central Open Directory authentication or is each computer standalone?
Do you have admin access to all computers over SSH?
Do all computers have the same user account setup?

The feature you want to disable is the AutoLogin option in the Users & Groups settings in the System Preferences.

You can do this via ssh command line on each computer
 sudo defaults delete /Library/Preferences/com.apple.loginwindow autoLoginUser

Open in new window

You should also remove the password file
 sudo rm /etc/kcpassword

Open in new window


If you want to stop users re-setting the account to autologin you can create a launchd script that periodically repeats the above commands .. as described here
http://reviews.cnet.com/8301-13727_7-57449779-263/how-to-disable-automatic-log-in-via-the-command-line-in-os-x/


It is also scriptable but will need to be run on each computer as a login item

The following is an AppleScript which tightens the standard security for a user and includes removing the autologin .. they will need to logout or restart after this process to see the new settings
tell application "System Events"
 tell security preferences
 get properties
 set properties to {require password to wake:true, secure virtual memory:false, require password to unlock:true, automatic login:true, log out when inactive:true, log out when inactive interval:60}
 end tell
end tell

Open in new window


If you're feeling more adventurous there is some good appleScript here that steps through all user accounts and removes the autologin on whichever is set (it also allows you to pick a user for autologin which you can remove
http://macscripter.net/viewtopic.php?id=17957
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Information security is a multi-billion dollar industry. Just as lucrative is the black market industry which trades stolen identities, credit card numbers and software exploits all over the world. Nothing is hack-proof. The best one can do is make …
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question