in terminal:
security dump-keychain -a | less > dump.txt
Tag: Mac
Get MAC's serial no via terminal
SSH into the mac,
> system_profiler SPHardwareDataType | grep “Serial”
this command should get u the serial no. (works on Mojave)
Install .pkg in MAC via ssh
Commands here:
sudo mkdir /Volumes/mnt
sudo mount_afp afp://osxserver/mnt /Volumes/mnt
sudo cp /Volumes/mnt/OpenToonz.pkg /scripts
sudo installer -pkg /scripts/OpenToonz.pkg -target /
Crontab - Force Shutdown in OSX
sudo crontab -e
Press i (insert text in vim)
30 19 * * 5 /sbin/shutdown -h now
Press esc (to exit editing)
Press shift+z shift+z (Writes changes and quit vim)
Time format in Crontab:
* * * * * command to execute
│ │ │ │ │
│ │ │ │ └─── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
│ │ │ └──────── month (1 - 12)
│ │ └───────────── day of month (1 - 31)
│ └────────────────── hour (0 - 23)
└─────────────────────── min (0 - 59)
Map drive and copy in OSX's Terminal
I do this via ssh (putty):
cd /
sudo mkdir scripts
sudo mkdir /Volumes/mnt
sudo mount_afp afp://server.share/mnt /Volumes/mnt
sudo cp /Volumes/mnt/homedrive.sh /scripts
sudo cp -R /Volumes/mnt/MappedDrive.app /Applications
sudo cp -R /Volumes/mnt/StudentShared.app /Applications
sudo cp -R /Volumes/mnt/Microsoft\ Remote\ Desktop.app /Applications
sudo umount /Volumes/mnt
第一次拆開Macbook Pro
Still remembered my first day at PCSSC was to fix an IMAC.
As days goes by, my skills and knowledge in OSX also gaining paces.
Just recently we were able to deploy 2 labs of iMAC with imaging software (DeployStudio).
With ssh enabled on the machines, it also make our job a lot easier by remote into it and do some works as required.
I probably should do some Apple courses in the future.
It was actually quite easy to open up the Macbook Pro, but not iMAC though.