Anyway to change username

kencash

Verified User
Joined
Jul 17, 2004
Messages
45
I have a user that he want to change the username from user1 to kenlee1.
 
The only way to do it at this time is delete the old user and create a new one with the wanted username.
It might be possible to change the name in all the necassary files in /home/ /usr/local/directadmin/data /var/log etc but its more hassle than it's worth.

Just make a backup of his account contents, delete recreate and restore contents.
 
This is an old thread but it came up in a search to change a username. There IS a way to do it:

If you've got a client who wants to have a different username, then you change it by typing

cd /usr/local/directadmin/scripts
./change_username.sh olduser newuser

(From http://help.directadmin.com/item.php?id=193)
 
Of course the change_username.sh script did not exist when the question was asked.
 
Yup, that's why I updated this thread, and that's why I mentioned this is an old thread :)
 
If you've got a client who wants to have a different username, then you change it by typing

cd /usr/local/directadmin/scripts
./change_username.sh olduser newuser

How would I change, and not loose files/email. etc.

If I wanted to change and email-only user name to the username who owns the account on the server?

Example
Current
thom is the DA user
[email protected] is the email user

I would like to have thoml as the DA user
and
[email protected] as the email user

Thanks
 
First download all the email from the server.

Then delete [email protected].

then run the script to change the username for the domain to thoml.

Then create the mailbox [email protected].

By the way, Thom, I just tried sending mail to hisdomain.com; it bounced.

You should know better ;).

Jeff
 
his, yours and my

By the way, Thom, I just tried sending mail to hisdomain.com; it bounced.
You should know better ;).
Jeff

Thanks for the explanation Jeff....and I thought that using a real domain name was a requirement only when answering the question required some testing with that domain.

I wish I owned hisdomain, or yourdomain, or even mydomain.
 
I still answered the question, didn't I :).

So it's not a requirement.

:D

Jeff
 
Hello,

I found a bug in this script. If you use a remote mysql it fails.
 
I don't believe that remote MySQL is a standard DirectAdmin option. Nor do I know an easy way to know if a user was using remote MySQL.

And then of course there are the issues in making changes on a remote server from within a script.

If you can successfully rewrite the script to automate this as well, be sure to let us know.

Otherwise I'd probably think of it as a limitation rather than a bug.

Jeff
 
Back
Top