Accounts merge - incorrect no. of users

tarta

Verified User
Joined
Jan 31, 2018
Messages
82
Hi,


1) I had 6 users with 15domains
2) Ive moved all domains under one user following https://docs.directadmin.com/directadmin/general-usage/domains-users-resellers.html
3) users left: admin & residual (all domains under residual)
4) promoted residual to administrator level


Issue 1:
5) now when I access Admin level ==> move users between resellers I get an error:


rror filling USERS table: Unable to read user list file: Unable to open ./data/users/attentus/users.list for reading.
No such file or directory


6) running ./fix script (https://docs.directadmin.com/direct...how-to-rebuild-all-resellers-users-list-files)
gives

root@ds:~# ./fix.sh
fixing Reseller admin ...
fixing Reseller residual ...
root@ds:~#


whereas from Admin level I dont see any reseller (list empty).

Question 1: how to correct the user setup on DA? What I want is to have 2 accounts (admin & residual) only.

==============================================================

Issue 2: when I go to Admin level ==>> Admin Backup/transfer ==>> I get an error

Unable to read user list file: Unable to open ./data/users/attentus/users.list for reading.
No such file or directory


Question 2: how to correct the user setup on DA? I'm unable to run backups now


Issue 3:
On DA level it still shows 6 users. How to fix that?
 
whereas from Admin level I dont see any reseller (list empty).
Seems logical to me because:
4) promoted residual to administrator level
So you don't have any simple reseller anymore. You have 2 admins. So both will only show up in the admin list.

Unable to read user list file: Unable to open ./data/users/attentus/users.list for reading.
No such file or directory
Who is "attentus"?

Because you have a user called admin, and a user called residual. So where is attentus coming from?

Since you said:
Ive moved all domains under one user following
Under which user did you move them? And did you also moved the databases (if any) to that user? Because that has to be done manually.
And afterwards, did you delete the exising users? If not, why not?

As for issue 3. Use the "show all users" logged in as admin, on admin level. Select them and delete them.
 
Who is "attentus"?
that's oe of the old user that have had domains I've ow moved under user "residual"


Because you have a user called admin, and a user called residual. So where is attentus coming from?
that's a good question (causing following issues) why the account still appears - after movig domains, websites and databases from attentus to residual I have deleted the user. Yet, it still seems to be referenced somewhere.


Under which user did you move them? And did you also moved the databases (if any) to that user? Because that has to be done manually.
And afterwards, did you delete the exising users? If not, why not?

all domains from 6 users were moved under 'residual'. including sites, db's (manual move). all domains/sites are working correctly as expected.


As for issue 3. Use the "show all users" logged in as admin, on admin level. Select them and delete them.
As stated before, I can see 2 users only (admin, residual)

7) When I go to List Administrators on admin level I see 3 users, including attentus and "error realing file"
admin0 / unlimited0 / unlimited00 / unlimitedNo
attentusError reading File
residual36.7 / unlimited16947.3 / unlimited013 / unlimitedNo


 
note: I need 1 admininistrator account (admin) only.
residual can be downgraded to user level (how?)
 
residual can be downgraded to user level (how?)
I would first fix the attentus issue, to be sure no odd things will happen again and making things worse, before downgrading residual.

I have deleted the user.
I presume via the admin interface in Directadmin right?

Check if the username is present in /etc/passwd and also if there is a /usr/local/directadmin/data/users/attentus directory present.
And ofcourse if the /home/attentus directory is still present.
 
I presume via the admin interface in Directadmin right?
yes

Check if the username is present in /etc/passwd and also if there is a /usr/local/directadmin/data/users/attentus directory present.
And ofcourse if the /home/attentus directory is still present.
1) user no longer exists in /etc/passwd
root@ds:~# more /etc/passwd |grep att
root@ds:~#

2) directory is not present.
root@ds:/usr/local/directadmin/data/users# ls -la
total 16
drwx--x--x 4 diradmin diradmin 4096 Nov 1 13:29 .
drwx--x--x 10 diradmin diradmin 4096 Nov 1 17:11 ..
drwx--x--x 5 diradmin diradmin 4096 Nov 1 17:25 admin
drwx--x--x 8 diradmin diradmin 4096 Nov 1 14:48 residual
root@ds:/usr/local/directadmin/data/users#

3) /home/attentus
root@ds:/home# ls -la
total 48
drwxr-xr-x 7 root root 4096 Nov 1 12:58 .
drwxr-xr-x 24 root root 4096 Nov 1 03:00 ..
drwx--x--x 7 admin admin 4096 Nov 1 12:58 admin
drw-r----- 2 root root 4096 Sep 3 2018 backup
drwxr-xr-x 19 mysql mysql 4096 Nov 1 17:11 mysql
drwx--x--- 16 residual access 24576 Nov 1 12:53 residual
drwxrwxrwt 2 root root 4096 Nov 1 12:13 tmp
 
That is good news, then it seems that user indeed removed from the system but only remained present in the admin list as it shows there.

You can try this. Edit the following file.
/usr/local/directadmin/data/admin/admin.list
remove attentus
save the file and the restart directadmin.

Does this fix the problem?
 
You can try this. Edit the following file.
/usr/local/directadmin/data/admin/admin.list
remove attentus
save the file and the restart directadmin.

Does this fix the problem?
(y)

1) attentus is no longer present in 'List Administrators' or 'Show all users'. neither it apprear under Admin Backup/Transfer section (I can properly run the backup)

with this => how to downgrade residual to user level?
 
with this => how to downgrade residual to user level?
Try if this one works. Login to SSH as root:
cd /usr/local/directadmin/scripts ./reseller_to_user.sh

Be aware of the usage. In this case, the user to be, needs to be put in as first. Secondly, the name of the reseller he will reside under.
Code:
Usage:
  ./reseller_to_user.sh <user> <reseller>
so in your case I would try (from the scripts directory):
./reseller_to_user.sh residual admin

It might be best to create a backup before you do this, just in case. ;)
 
we are almost there.. mismatch between admin vs reseller:

root@ds:/usr/local/directadmin/scripts# ./reseller_to_user.sh residual admin
{"account":"residual","actual":"admin","expected":"reseller","type":"ACCOUNT_ROLE_MISMATCH"}
root@ds:/usr/local/directadmin/scripts#

so I guess we need to go 1) admin > reseller & 2) reseller > user
 
so I guess we need to go 1) admin > reseller & 2) reseller > user
Yes probably, although it's a bit odd since admin is also reseller.

Before I posted I've also been looking to degrade an admin to a reseller or user, but couldn't find it.

But now I found an old one. You can degrade an admin manually to a reseller like this.

1) To downgrade an Admin to a Reseller, edit:
/usr/local/directadmin/data/admin/admin.list

and remove the Admin from the file. So remove risidual.

2) Edit:
/usr/local/directadmin/data/admin/reseller.list

and add the account to the file. So add the name risidual

3) Edit:
/usr/local/directadmin/data/users/risidual/user.conf

change:
usertype=admin

to be:
usertype=reseller

And restart directadmin.
Doublecheck if the change took place correctly.

If it did, then use the reseller to user script again to make him a user.
 
lovely! , it worked like a charm ;)

I followed all steps and got exactly what I needed:

1) one admin account > admin
2) one user account > residual
3) all domains/data moved under residual

Thank you very much Richard! Much appreciated!
 
one thing which botters me still is =>> why DA is still showing Users 6

DA.png
 
Thank you very much Richard! Much appreciated!
You're welcome. Glad to hear that everything is fine now.

As for the fact that DA is still showing 6 users, this could be due to the tally. I would wait until tomorrow to see if it's updated during the nightly tally.
 
You're welcome. Glad to hear that everything is fine now.

As for the fact that DA is still showing 6 users, this could be due to the tally. I would wait until tomorrow to see if it's updated during the nightly tally.
all cleared now:
Users 1


Users
1​
 
Back
Top