Skip to main content
Question

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

  • July 8, 2016
  • 4 replies
  • 64 views

mhasman
Forum|alt.badge.img+22

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

Forum|alt.badge.img+8
  • New Contributor
  • July 8, 2016

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
Forum|alt.badge.img+22
  • Author
  • Valued Contributor
  • July 8, 2016

@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)


Forum|alt.badge.img+11
  • Contributor
  • July 10, 2016

Check out this post, should help you.

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


mhasman
Forum|alt.badge.img+22
  • Author
  • Valued Contributor
  • July 11, 2016

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!