Sunday, September 13, 2009

Some image based things

Some things you might want to consider doing for your image....run these as sudo


# Hide account from login Window
defaults write /Library/Preferences/com.apple.loginwindow  HiddenUsersList  -array-add accountsname

# Locking down SSH to a given username
echo "AllowUsers username" > /etc/sshd_config
echo "PermitRootLogin no" >> /etc/sshd_config
echo "PermitEmptyPasswords no" >> /etc/sshd_config

# Enabling Shortname in Connect to Server dialog
defaults write /Library/Preferences/com.apple.NetworkAuthorization UseDefaultName -bool NO
defaults write /Library/Preferences/com.apple.NetworkAuthorization UseShortName -bool YES


# Disabling Computer-Computer network creation without admin rights
/usr/libexec/airportd en1 -ibss_admin 1

# Enabling DVD Set Region First Time - Anyone
/usr/bin/security authorizationdb write system.device.dvd.setregion.initial allow

# Disable iWeb upsale dialog
defaults write /Users/username/Library/Preferences/com.apple.iWeb dismissDotMacUpsellWindow -bool True

# Remove sidebar settings and keychain from template account

rm /Users/username/Library/Preferences/com.apple.sidebarlists.plist
rm /Users/username/Library/Keychains/login.keychain