This is what I have now, just looking for guidance on making this work
#!/bin/sh
username=`ls -l /dev/console | cut -d " " -f 4`
scutil --set ComputerName "$4""$username"
scutil --set HostName "$4""$username".domain
scutil --set LocalHostName "$4""$username"
jamf recon
If I execute this script from terminal following results:
SCPreferencesSetLocalHostName() failed: Invalid argument
I can run following lines, line by line fine all is good.
scutil --set ComputerName whateverUsername
scutil --set HostName whateverUsername.domain
scutil --set LocalHostName whateverUsername
Any suggestions?