# Changing Account Name?



## NovaScotian (Feb 23, 2004)

I have stupidly used the same account name on two OS X machines (one Jaguar the other Panther), and obviously that leads to confusion when connecting from one to the other. 

Is there a way to change the name and shortname of either from the terminal? It's not possible from the Accounts Preference Pane - both are dimmed.


----------



## leinad256 (Feb 23, 2004)

why dont you create a new account and delete the other one?


----------



## brianleahy (Feb 23, 2004)

> why dont you create a new account and delete the other one?



My thoughts exactly, I recently had to do this on several machines.  When deleting an account you can even have it archive the deleted users' home folder, which you can then later extract into the home folder of the new user you created to replace it.


----------



## NovaScotian (Feb 23, 2004)

I didn't simply delete the account and create another because I wasn't sure how to move all the old user's files to the new account, get permissions all up to snuff, have all the applications remain accessible, keep Apache, PHP, and MySQL functioning properly, and have SSH work without having to frig around with the key. Clearly OS X's protections confuse me no end. 

If creating a new user and deleting the old one is the only option, I'll leave things as they are. Thanks anyway.


----------



## leinad256 (Feb 23, 2004)

you can change the computer name too, in the preferences panel


----------



## brianleahy (Feb 23, 2004)

If you're afraid of deleting the old user, it *IS* possible to copy the files from one user to another BEFORE deleting the old user - via terminal.   I think you'd do it this way:

sudo cp -R /Users/oldUser/* /Users/newUser/*

Anyone see a flaw in this?


----------



## dagaz (Feb 23, 2004)

brianleahy said:
			
		

> If you're afraid of deleting the old user, it *IS* possible to copy the files from one user to another BEFORE deleting the old user - via terminal.   I think you'd do it this way:
> 
> sudo cp -R /Users/oldUser/* /Users/newUser/*
> 
> Anyone see a flaw in this?



The main flaw is that cp doesn't copy resource forks.  I would use *sudo ditto -rsrc /Users/olduser/ /Users/newuser/ *  the other advantage of ditto is that it automatically copies directories.

EDIT: the above code should be written across a single line with a single space after ditto, -rsrc, olduser/

BUT, getting back to the original question, I have the same account on my computer and my girlfriend's computer, which makes it a lot easier to connect together (admittedly we're both running 10.3 but I don't think that should be an issue), we even have exactly the same account names and passwords on each others computer and this works really well for us (I connect to her computer to print).


----------

