- Open the Terminal Application
- Type in
sudo -i
and type in your Mac Administrator account password.sudo
gives you root level or administrator level privileges.
dsconfigad -show
#!/bin/bash | |
# NOTE: this is an OSX launchd wrapper shell script for Tomcat (to be placed in $CATALINA_HOME/bin) | |
CATALINA_HOME=/Users/username/tomcat | |
function shutdown() { | |
date | |
echo "Shutting down Tomcat" | |
$CATALINA_HOME/bin/catalina.sh stop |
#!/bin/bash | |
# Provide user info about the computer | |
# Kris Payne | |
# run this shiz in a policy in Self Service. It will let the user copy their IP or Computer name for you. | |
# slower than >System Preferences>Network ? Yes. Easier to explain? Yes. | |
# Definitions | |
thisComputerName="scutil --get ComputerName | pbcopy" | |
thisIPAddress=$(ifconfig | grep "inet " | grep -v 127.0.0.1 | awk {'print $2'} | pbcopy) |
#!/bin/bash | |
# Check for expiring password, then prompt to change with cocoaDialog | |
# Kris Payne | |
# Variables | |
user=`ls -l /dev/console | awk '{ print $3 }'` | |
pwdThreshold=7 | |
pwdPolicy=90 | |
CD="/Applications/Utilities/CocoaDialog.app/Contents/MacOS/CocoaDialog" |
sudo -i
and type in your Mac Administrator account password. sudo
gives you root level or administrator level privileges.dsconfigad -show
#!/bin/bash | |
# Original: https://jamfnation.jamfsoftware.com/discussion.html?id=14467 | |
# Useful script for deploying printers in a Casper Environment | |
# Originally by Lwindram on JAMF Nation forums | |
# https://jamfnation.jamfsoftware.com/viewProfile.html?userID=11026 | |
# Edited to use JSS Script Parameters to make the script portable to all Models. Define $vars in JSS Policy. | |
## Translations | |
# man lpadmin |
sudo scutil --set ComputerName "newname" | |
sudo scutil --set LocalHostName "newname" | |
sudo scutil --set HostName "newname" |
#!/bin/sh | |
# Determines who is logged in and then kills SEP and relaunches sans reboot. | |
# Get logged in user from /dev/console | |
loggedInUser=`ls -l /dev/console | awk '{ print $3 }'` | |
if [ "$loggedInUser" != "admin" ] | |
then | |
launchctl unload /Library/LaunchDaemons/com.symantec.Sched501-1.plist |
found on http://draac.com/chmodchart.html #CHMOD Chart CHMOD is used to change permissions of a file.
PERMISSION COMMAND
U G W
rwx rwx rwx chmod 777 filename
rwx rwx r-x chmod 775 filename
rwx r-x r-x chmod 755 filename
rw- rw- r-- chmod 664 filename
to enable: sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users ADMIN_USER_HERE -privs -all -restart -agent -menu
to disable: sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off
sudo /usr/sbin/jamf createAccount -username netadmin -realname "Network Administrator" -password "p@55w0rd" -home "/var/netadmin" -hiddenUser -admin -secureSSH |