Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My username (the first thing you see on every line in the Terminal) has changed. It used to be my first name (Jonathan), but it has changed to the name of a freelance web project I'm currently working on, followed by my first name (projectname:~ Jonathan).

I think this is somehow caused by my local development environment: I'm using Apache, PHP and MySQL from WebStart (a MAMP-like application). It could have been caused by MAMP Pro as well, although I haven't used it for a long time. Other options are Gitbox (or Git) or Coda, but I think that wouldn't be possible. I can't think of other apps that know the name projectname.

This is from my terminal:

projectname:~ Jonathan$ dscl . read /users/Jonathan
dsAttrTypeNative:_writers_hint: Jonathan
dsAttrTypeNative:_writers_jpegphoto: Jonathan
dsAttrTypeNative:_writers_LinkedIdentity: Jonathan
dsAttrTypeNative:_writers_passwd: Jonathan
dsAttrTypeNative:_writers_picture: Jonathan
dsAttrTypeNative:_writers_realname: Jonathan
dsAttrTypeNative:_writers_UserCertificate: Jonathan
dsAttrTypeNative:LinkedIdentity:[REMOVED PLIST containing Apple ID for password restore]

AppleMetaNodeLocation: /Local/Default
AuthenticationAuthority: ;ShadowHash;HASHLIST:<SALTED-SHA512> ;Kerberosv5;;Jonathan@LKDC:SHA1.[REMOVED hash/characters]
GeneratedUID: [REMOVED good-looking UID]
JPEGPhoto:[REMOVED binary image]
NFSHomeDirectory: /Users/Jonathan
Password: [REMOVED stars]
PasswordPolicyOptions:[REMOVED PLIST containing some timestamps]

PrimaryGroupID: 20
 Jonathan [REMOVED last name]
RecordName: Jonathan
RecordType: dsRecTypeStandard:Users
UniqueID: 501
UserShell: /bin/bash


projectname:~ Jonathan$ dscl . list /users

As you can see projectname is only shown in the terminal and not in the output of dscl. I hope someone knows what might have caused this change and how to revert it.

Due to the nature of this project, I can't make the name public at the moment. Because of that I've replaced it with projectname.

share|improve this question
That's not your username, that's your hostname. Can you run, and post the output of: echo $PS1? – VxJasonxV May 29 '12 at 18:35
@VxJasonxV projectname:~ Jonathan$ echo $PS1 outputs \h:\W \u\$. – Jonathan May 29 '12 at 18:36
up vote 3 down vote accepted

In this case, it's your computer's hostname that has changed. I figure this is for one of two reasons:

  1. It was changed by yourself or some other individual.

  2. You were on-site at the client's company, and their DHCP server and DNS server are in cahoots.

By this I mean, if there are Reverse DNS entries on a particular network, there is something in OS X that causes that Reverse DNS name to apply to your computer when you have the IP. I've also seen this occur when individuals VPN into a network as well.

IIRC, you must manually reset your hostname in order to undo that change.

Click the big in the top-left, click System Preferences. Choose the Sharing Preference Pane. There you'll see your hostname right at the top of the preferences window. Change it, and done!

share|improve this answer
Thanks! It was the reverse DNS. I added an entry (and a reverse one) of project name.local with my machine's IP address to my local DNS server, to enable testing the project on my iPad. I've changed my terminal to only show the current directory by adding this command to the file ~/.bash_profile: export PS1="\w$ ". – Jonathan May 29 '12 at 18:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .