reseller's username

milan

Verified User
Joined
Dec 29, 2005
Messages
78
Hello all,

I am wondering if it is posible to change a resellers username.

Thanks for the input :)
 
Hi

Sorry, I'm a french user.

You can speak to your admin to create another reseller acccount.

After that, your admin can move your account on your new reseller account

He can deleted at finish


Your admin can find help on
http://help.directadmin.com/item.php?id=93
to moving your users
 
Last edited:
Hi

Sorry, I'm a french user.

You can speak to your admin to create another reseller acccount.

After that, your admin can move your account on your new reseller account

He can deleted at finish


Your admin can find help on
http://help.directadmin.com/item.php?id=93
to moving your users

I am owner of the server to, so im admin to ;). The problem is i have to change my company name due some company name problems. The only thing is i dont wanne change or delete anything etc etc. Is there no easy way to change users names?
 
I believe there's a DA script for changing usernames.

I don't know if it works for resellers.

Look in the DA scripts directory.

Read the script to see if it does everything that needs to be done.

Make backups first.

Jeff
 
I believe there's a DA script for changing usernames.

I don't know if it works for resellers.

Look in the DA scripts directory.

Read the script to see if it does everything that needs to be done.

Make backups first.

Jeff

Okej I manged to change the username it worked but i got some errors.

1: renaming MySQL database user_db dont doenst work. (I fixed that by exporting & importing)
2: I and facing some mail probles.

"Reason Given: Internal error occurred. Refer to server log for more information."

I logged on the server with ssh with the root user

I checked in the /home/username/ dir and there was in the imap directory stating old.ext i changed it to new.ext

After it schoed that the new.ext was linked to /var/spool/virtual/old.ext
i changed this to /var/spool/virtual/new.ext

But still I cant manage to login to the email accounts. It looks like the auth files are stating the old info. Where can i change these files?
 
I don't see where you mentioned changing the domain-name; only the username :( .

You can easily change a domain name from the Domain Setup screen from the user login.

Jeff
 
I don't see where you mentioned changing the domain-name; only the username :( .

You can easily change a domain name from the Domain Setup screen from the user login.

Jeff

Thats true, I changed that via that tool. But the fact was before i changed the domain name some files are still using the old user name.

I now am able to login to the email accounts. It looks like I had faced a dns delay period, when I login I am still not able to see the emails containings folders and emails.

Jeff might you know where all accounts are been saved with dovecot?
 
Last edited:
could it be that its refferes to the old path?

for example:

/home/olduser/domains/olddomain.ext/imap/Maildir/adress

/home/newuser/domains/newdomain.ext/imap/Maildir/adress

Does anyone know where this is stored?

Thanks
 
The script that can do it is:
Code:
cd /usr/local/directadmin/scripts
./change_username.sh [b]olduser[/b] [b]newuser[/b]
The username is saved in so many places, it's not advisable to change it manually.

Imap files live in:
/home/username/imap/domain.com/user/Maildir

or for the main account:
/home/username/Maildir

Double check the /etc/virtual/domain.com/filter to ensure it's been updated as well with the new username.

John
 
The script that can do it is:
Code:
cd /usr/local/directadmin/scripts
./change_username.sh [b]olduser[/b] [b]newuser[/b]
The username is saved in so many places, it's not advisable to change it manually.

Imap files live in:
/home/username/imap/domain.com/user/Maildir

or for the main account:
/home/username/Maildir

Double check the /etc/virtual/domain.com/filter to ensure it's been updated as well with the new username.

John

Hi john,

I used the ./change_username.sh script and then the problems came up.
Ill send give you a login to an email account that has the problem.
Also the database name are not changed with the script: for example:

oldusername_dbname & user oldusername_dbuser

will be changed to this with the script:
oldusername_dbname & user newusername_dbuser

So the database name is still in the old situation and this will result in DA webbase cp as -1 datebase accounts.
 
Ok, check the /etc/virtual/domain.com/passwd file if you are using dovecot.
The path to the email accounts should point to the user.. I believe the change_username.sh script was created pre-dovecot, so they'll likely need changing. Try this code:
Code:
cd /etc/virtual/[b]domain.com[/b]
perl -pi -e 's#/home/[b]oldusername[/b]#/home/[b]newuser[/b]#' passwd
which should swap all of the home paths around for you.

For mysql, the script change_database_username.php is called by the change_username.sh script for the mysql table data... and for the database itself, the mysqld process is shut off temporarily and the file moved around. Are you by chance using debian? As inspecting the code, it seems to be attempting to access the database in /var/lib/mysql instead of /home/mysql

John
 
Ok, check the /etc/virtual/domain.com/passwd file if you are using dovecot.
The path to the email accounts should point to the user.. I believe the change_username.sh script was created pre-dovecot, so they'll likely need changing. Try this code:
Code:
cd /etc/virtual/[b]domain.com[/b]
perl -pi -e 's#/home/[b]oldusername[/b]#/home/[b]newuser[/b]#' passwd
which should swap all of the home paths around for you.

For mysql, the script change_database_username.php is called by the change_username.sh script for the mysql table data... and for the database itself, the mysqld process is shut off temporarily and the file moved around. Are you by chance using debian? As inspecting the code, it seems to be attempting to access the database in /var/lib/mysql instead of /home/mysql

John

Thanks for the reply. Yes I'am using da on a debian sarge 3.1 box. All email accounts are working fine now!

Thanks for the help
 
I believe there's a DA script for changing usernames.

I don't know if it works for resellers.

Look in the DA scripts directory.

Read the script to see if it does everything that needs to be done.

Make backups first.

Jeff

Hi Jeff,

Where is this script? I've looked in the knowledge base, and searching and found nothing.

Thanks !
 
Right on! Thanks,

Where can I find the documentation to use it correctly ? Or is it a wizard ?

Thanks nonetheless !
 
Code:
cd /usr/local/directadmin/scripts
./change_username.sh [b]oldusername newusername[/b]
 
Hi,

I ran this script, and although it changed the username listed under "show accounts" the old username is still needed for the client to login to their DA

Any ideas?
 
Ok, check the /etc/virtual/domain.com/passwd file if you are using dovecot.
The path to the email accounts should point to the user.. I believe the change_username.sh script was created pre-dovecot, so they'll likely need changing. Try this code:
Code:
cd /etc/virtual/[b]domain.com[/b]
perl -pi -e 's#/home/[b]oldusername[/b]#/home/[b]newuser[/b]#' passwd
which should swap all of the home paths around for you.

For mysql, the script change_database_username.php is called by the change_username.sh script for the mysql table data... and for the database itself, the mysqld process is shut off temporarily and the file moved around. Are you by chance using debian? As inspecting the code, it seems to be attempting to access the database in /var/lib/mysql instead of /home/mysql

John

Just used the change_username.sh script and all worked great, except for the emails (I use Dovecot). I manually fixed with the above information.

But the message is from April, couldn't this simple line be added to the change_username.sh script to avoid future problems with other users?
 
Thanks, I've just added the lines:
Code:
                #the dovecot passwd file uses the same format as the ftp.passwd file.
                ftp_pass_swap $1 $2 /etc/virtual/$i/passwd
to the email_swap() function. I then moved ftp_pass_swap above email_swap so that it would work.

John
 
Back
Top