Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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]
AuthenticationHint: 
GeneratedUID: [REMOVED good-looking UID]
JPEGPhoto:[REMOVED binary image]
NFSHomeDirectory: /Users/Jonathan
Password: [REMOVED stars]
PasswordPolicyOptions:[REMOVED PLIST containing some timestamps]

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

----------

projectname:~ Jonathan$ dscl . list /users
_amavisd
_appowner
_appserver
_ard
_atsserver
_avbdeviced
_calendar
_ces
_clamav
_coreaudiod
_cvmsroot
_cvs
_cyrus
_devdocs
_devicemgr
_dovecot
_dovenull
_dpaudio
_eppc
_ftp
_installassistant
_installer
_jabber
_kadmin_admin
_kadmin_changepw
_krb_anonymous
_krb_changepw
_krb_kadmin
_krb_kerberos
_krb_krbtgt
_krbtgt
_lda
_locationd
_lp
_mailman
_mcxalr
_mdnsresponder
_mysql
_netbios
_netstatistics
_networkd
_pcastagent
_pcastlibrary
_pcastserver
_postfix
_postgres
_qtss
_sandbox
_screensaver
_scsd
_securityagent
_serialnumberd
_softwareupdate
_spotlight
_sshd
_svn
_taskgated
_teamsserver
_timezone
_tokend
_trustevaluationagent
_unknown
_update_sharing
_usbmuxd
_uucp
_warmd
_webauthserver
_windowserver
_www
_xgridagent
_xgridcontroller
daemon
Guest
Jonathan
macports
nobody
root

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.