Change users full name to account name?

jonlju
Contributor

Hi all,

Due to some issues with how a new printer server is configured, we would need to populate the "Full name" ID of our users on Macs with their account name instead.

Due to user account control they are not able to do this themselves, so I'm wondering if somehow has a nice solution (or a script) to do this automatically in Jamf?

I've been "out of it" for about 1,5 year now and coming back there are some areas I need to sharpen up again :)

2 REPLIES 2

joshuasee
Contributor III

dscl . -create /Users/$targetuser RealName $targetuser will do what you're asking for a given account, but I'd recommend looking into less drastic methods first. Usernames on CUPS print jobs are configurable. For an SMB queue as a whole it would be lpadmin -p localqueuename -D'User Friendly Printer Name' -E -v smb://username:escaped%20password@server_path/remotequeuename -m drivername .

jonlju
Contributor

Thanks @joshuasee for this. The first script would essentially make the users "Full name" field the same as their "Account name" then?

Edit: I tried this now but it didn't seem to change the full name of the user. What am I missing?

I'll look into the latter solution as well, I just need to understand what it does.