Solved

Mac Login page

Posted on 2013-10-23
2
296 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
2 Comments
 
LVL 53

Accepted Solution

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This article describes in detail how to set up the iPad in the Enterprise using iPCU aka iPhone Configuration Utility.  This could also be used for the iPhone although I have not detailed out any differences. Preparation as an iPad Administrator:…
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now