[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Mac Login page

Posted on 2013-10-23
2
Medium Priority
?
322 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 1500 total points
ID: 39595974
0
 
LVL 41

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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
A professional opinion on which Apple product to buy, and a tidbit about the WWDC.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

650 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