purplepaws

Well-Known Member
Jan 15, 2002
153
0
316
When trying to change a users username using the modify an account function in WHM we get this message.....

FIXME: This functionality is currently not implemented
Unable to change user name

How can we change a users username if this doesnt work?
 

macian

Member
Oct 17, 2002
12
0
151
FIXME: This functionality is currently not implemented

Yes I am having the same problem trying to change a username.
 

mikerayner

Well-Known Member
Apr 10, 2002
192
0
316
[quote:d5ee9c92d9][i:d5ee9c92d9]Originally posted by macian[/i:d5ee9c92d9]

Yes I am having the same problem trying to change a username.[/quote:d5ee9c92d9]
I think you cannot change username from WHM because this functionality hasn't been implemented yet by Developers
 

rinty

Well-Known Member
May 31, 2002
46
0
306
you can not change usernames at this time... only way around it is to terminate the account and recreate....
 

wacnstac

Well-Known Member
Mar 11, 2003
53
0
156
Well this creates a real problem for me since I need to transfer 2 accounts from 2 different servers both of which have the same username. Any ideas anybody?
 

Johnnie Nelke

Active Member
Jan 9, 2003
37
0
156
USA
You are just going to have to create one of them by hand...... sad fact until CPanel sets this up......
 

wacnstac

Well-Known Member
Mar 11, 2003
53
0
156
How about this script? Has anybody tried it and run it sucessfully? Copying either of these two by hand and setting things up properly would be a real pain, and it is also my understanding that the account would and could not then be recognized by cpanel, ... is this true?
 

spoony

Member
Mar 14, 2002
11
0
301
Here is a script to rename users.

http://forums.burst.net/showthread.php?s=&threadid=37

compliments of TheVoice

<edit>
And of course brandonk :D
</edit>


cd /
pico

Then copy the following code and right click to paste it into your pico session.

code:
--------------------------------------------------------------------------------

#!/bin/sh
# old username
username1='oldusername'

# new username
username2='newusername'


# edit /etc/passwd
perl -pi -e "s/$username1/$username2/g" /etc/passwd

# edit /etc/shadow
perl -pi -e "s/$username1/$username2/g" /etc/shadow

# edit /etc/group
perl -pi -e "s/$username1/$username2/g" /etc/group

#going into users directory
cd /var/cpanel/users

# chaning cpanel file
mv $username1 $username2

# editing httpd.conf
perl -pi -e "s/User $username1/User $username2/g" /usr/local/apache/conf/httpd.conf
perl -pi -e "s/Group $username1/Group $username2/g" /usr/local/apache/conf/httpd.conf
perl -pi -e "s&/home/$username1/&/home/$username2/&g" /usr/local/apache/conf/httpd.conf

#going into home directory
cd /home

# moving main directory
mv $username1 $username2

# replacing every instance of /home/username in every file in the new main directory
# this will fix most cgi problems with changing directory paths
# if you don't need this comment it out as it takes awhile
find /home/$username1 -type f -exec perl -pi -e "s/\/home\/$username1/\/home\/$username2/g" {} \;

# setting permissions
chown -R $username2 /home/$username2
chgrp -R $username2 /home/$username2

# running necessary cpanel updates
/scripts/updateuserdomains
/scripts/mailperm
/scripts/ftpupdate

--------------------------------------------------------------------------------

Make sure you edit the file at the top to have the old and new username before you save it.

Type Cntr-X and save as usernamechange. Do not put an extension on the file.

Then type ./usernamechange and watch the magic.

restart apache after changing usernames

/etc/rc.d/init.d/httpd restart

-/Steve
 
Last edited: