Is it possible to pull the username from Self Service Log In?

rob_hernandez
New Contributor III

Does anyone know whether there is a way to determine the currently logged in Self Service user via terminal/bash?

I am in the process of developing a script that would map a managed network printer, but in order to do so I also need to provide the Active Directory username in order to map the printer correctly. Since our Macs will not be bound to AD, I cannot trust that the local user accounts will follow our AD user naming conventions correctly. Otherwise I'd simply call id -un and call it a day. Any ideas?

Thanks in advance for any feedback.

1 ACCEPTED SOLUTION

rob_hernandez
New Contributor III

Looks like I may have answered my own question (after extensive searching before and after this post)...

https://www.jamf.com/jamf-nation/articles/146/script-parameters

TIL - My SearchFu is weak...

View solution in original post

1 REPLY 1

rob_hernandez
New Contributor III

Looks like I may have answered my own question (after extensive searching before and after this post)...

https://www.jamf.com/jamf-nation/articles/146/script-parameters

TIL - My SearchFu is weak...