Solved

Mac Login page

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mac ACL umask setting Everyone Read+Write 4 60
Mac keep giving me java error 13 59
can't connect to wireless with ipad 12 70
Macbook has frequent sleep / awake failures 26 139
A common question or need, when setting-up a new Mac for someone would be to make all of the applications, installed, available from the dock. Many people often do not realize an application is installed unless it is in the dock. Creating a custo…
There is a security feature on iOS devices that is nearly impenetrable when it has been activated.  This article will provide some possible solutions as well as necessary steps to take to ensure you do not end up with a locked device.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

776 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