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