Web Hosting Talk







View Full Version : Changing Usernames


sbrad
02-27-2002, 10:30 AM
I'm sure there's got to be a way to change a username, right? I'm moving accounts from one WHM to another server, and the account transfer feature tells me that, since a username starts with a number, I'm screwed. Anybody know how I can change the usernames on the old machine?

kwimberl
02-27-2002, 11:30 AM
Modify an account. You can change domain or username there.

sbrad
02-27-2002, 11:38 AM
No you can't.

kunal
02-27-2002, 12:00 PM
you cant change a users username.. you would have to delete his/her account...

or you could goto the command line and manually add a new user.. move the files over to the new users account yadda yadda ;)

sbrad
02-27-2002, 12:15 PM
you cant change a users username.. you would have to delete his/her account... Actually, not quite.
Travis from Powersurge told me how to do it. It took a few minutes, but was well worth it.

kunal
02-27-2002, 12:37 PM
umm... how did ya do it?? :)

sbrad
02-27-2002, 12:59 PM
Here's his post from Cpanel Support:
change /etc/passwd & /etc/shadow entries, just jump to the line with the username with the number, and change the username to the new name.....

then copy their /var/cpanel/users file to the new form of the user (within that same directory).....

A few cgi-type items may fall apart which are cpanel related, if they had them configured, but that is to be expected when you completely change a username.

Reset permissions over their root directory when complete to make sure all is well (and recurrsively)
And then /scripts/updateuserdomains
and
/scripts/mailperm

Make sure that your /etc/proftpd.conf and /etc/proftpd/USERNAME or /etc/proftpd/passwd.vhosts files are correct (/scripts/ftpupdate).... and make sure your apache config has the correct paths in conjunction with the new username for the account.

kunal
02-27-2002, 01:17 PM
duh ;)

yeah, you would also have to change the users /home directory name to reflect his new username....

sbrad
02-27-2002, 01:38 PM
Yeah, goes without saying. I think it was implied.
In any case, it wasn't too hard. Everything updated just like it should have.

f5hosting.com
03-17-2002, 01:29 AM
Im probably gonna sound like an idiot here, but what exactly does /scripts/mailperm do?

Jedito
03-17-2002, 01:35 AM
Originally posted by f5hosting
Im probably gonna sound like an idiot here, but what exactly does /scripts/mailperm do?
I'm not quite sure, but I think that fix permission problems in the /home/username/mail folder.

f5hosting.com
03-17-2002, 01:37 AM
thanks, Jorge! ;)

Jedito
03-17-2002, 01:40 AM
No Problem :)

BTW, I just tested with an user with problems in his email, and yes, it fix permission problems :)

f5hosting.com
03-17-2002, 01:41 AM
wouldnt know where I could get an autosetup script would ya? Email me if you do!

Jedito
03-17-2002, 07:27 AM
Allen can you drop me an email to jorgec@downtownhost.com? I lost your email :(