Terminal - how to change first and last name on local account

mhasman
Valued Contributor

Hello!

I am trying to change the First and Last name on local account using that command:

sudo dscl . -change /Users/U12345 RealName "Smith, John" U12345

and it gives me an error

<main> attribute status: eDSAttributeNotFound
<dscl_cmd> DS Error: -14134 (eDSAttributeNotFound)

Please help :)
Thanks!

4 REPLIES 4

JamesJhoung
Contributor

Is John smith the current real name or is U12345? The old value should come first before the new.

sudo dscl . -change /Users/U12345 RealName U12345 "Smith, John"

mhasman
Valued Contributor

@james179

Current real name is "Mary Kay", account ID U12345. I want to keep the same ID but change the "real" name to "John Smith"
Now it gives me an error:

<main> attribute status: eDSAttributeNotFound
<dscl_cmd> DS Error: -14134 (eDSAttributeNotFound)

pblake
Contributor III

Check out this post, should help you.

https://jamfnation.jamfsoftware.com/discussion.html?id=6658

mhasman
Valued Contributor

Thanks for your help!
That one finally works for me in terminal:

sudo /usr/bin/dscl . -change /Users/I12345 RealName "Mary Kay" "John Smith"

Now -read gets back with the new full name:

sudo dscl . -read /Users/U12345 RealName
RealName: John Smith

@james179, @pblake - thanks again!