Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > How to change user name on the fly?

How to change user name on the fly?
Thread Tools
Baninated
Join Date: Sep 2003
Status: Offline
Reply With Quote
Sep 24, 2003, 03:03 AM
 
Hi. I'm fed up with having to type a username when I log into the computer lab with ssh or when I copy with scp.

So I would like to change my username on my Mac to the same one I have on my computer lab account (so I don't have to type it in when I do ssh or scp)

Can I do this in system prefs by just changing my short username? Is it that simple? Will this update the whole system at once? Or do I have to screw around with Netinfo or the terminal?

Any known problems when doing this? Safety? Keychain?

Please tell me this is simple.
     
Mac Enthusiast
Join Date: Jul 2002
Location: Leiden, Netherlands
Status: Offline
Reply With Quote
Sep 24, 2003, 05:14 AM
 
Originally posted by Dumbo:

Can I do this in system prefs by just changing my short username? Is it that simple? Will this update the whole system at once? Or do I have to screw around with Netinfo or the terminal?


Please tell me this is simple.
Create a new user wh'os short name is the one on the computer machine. open terminal su to tha new user and thenscp/ssh has you like.

You might check out yuor ssh config which should be able to take care of that kind of problem too.
     
Mac Enthusiast
Join Date: Jan 2002
Location: Trondhjem, Norway
Status: Offline
Reply With Quote
Sep 24, 2003, 08:06 AM
 
Just create a file within ~/.ssh/ called config and that holds a few lines like these:

Host server
User username
Hostname server.somewhere.com

'username' being your account name on the server, and in the Host line you can put whatever name you find convenient. If there are more servers, just add more groups.

Then you can type: ssh server to connect, and scp file.c server:~/folder/ to copy files to the server.

Better yet, install some apps that take care of ssh identities, ssh-agent and ssh-add. Then you won't need to type passwords.
     
Clinically Insane
Join Date: Apr 2000
Status: Offline
Reply With Quote
Sep 24, 2003, 09:36 AM
 
Don't rule out typing passwords... that's a major security hole.

Anyway, for your username dilemma, yes you could change the shortname, and that would make the default user whatever you set it to (ssh server would use your new shortname).

What I do is just put aliases in my .zshrc...

alias server="ssh user@server"
alias apple="ssh sjobs@os9rocks.apple.com"

Then I just type the server name and it will connect me as whatever user I specified with the alias...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:38 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2