Solved

Mac Login page

Posted on 2013-10-23
2
300 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

iCloud Drive was introduced after iOS 8 was launched last year. This drive is Apple’s online storage device that lets users sync their files and access them from all their Apple devices.   There is a lot of data that is not automatically backed up…
In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

911 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

22 Experts available now in Live!

Get 1:1 Help Now