Issue After Deleting Default Admin Account

itcms

Verified User
Joined
Jul 4, 2019
Messages
112
Location
Athens
Hi,

I recently created a new admin account (admin2) to replace the default admin account.

Everything worked fine initially, but after deleting the original admin account, I encountered the following error in page myserverip:2222/evo/admin/all-users:

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

I found this related article: http://help.directadmin.com/item.php?id=251, which suggests some tips but I dont find my case

The page opens final and see my admin2 and show creator admin

Any idea how to fix ?

BR
Antonis
 
I encountered the following error in page myserverip:2222/evo/admin/all-users:
That is logical. Why do you get that page? If you login now, you have to login as the new admin so as admin2, and then this page should point to:
myserverip:2222/evo/admin2/all-users
So how did you get to that page with /admin/ in there?

There was somebody who had admin deleted and no issues: https://forum.directadmin.com/threads/delete-original-admin-account.70427/

However I also would advise to just create a terrible difficult password on the admin account and then just administer everything with the admin account you created yourself and leave the original one as is.
 
It looks like some of the links on the side are hardcoded and contains admin by default

Do you have any suggestions on how I can recreate the admin account?

This is a new server set up for testing.

As a last resort, I can delete and reformat, but I’d prefer to avoid that if there’s a simpler solution.

Just a not all other options working fine

This is an important reminder for everyone: avoid deleting the admin account.
 
Do you have any suggestions on how I can recreate the admin account?
Probably this will work.
1.) Login as your second admin
2.) Create a new admin account called admin which is allowed to do anything
3.) Login as root user via SSH and go to this file:
/usr/local/directadmin/data/users/admin/user.conf
edit that file and change:
creator=admin2
to
creator=root
and restart directadmin.

You can compare with this one, this is how the admin account looks in my case, I don't think I've changed something but you can always adjust to your needs:
Code:
account=ON
additional_bandwidth=0
aftp=ON
api_with_password=yes
auto_security_txt=OFF
bandwidth=unlimited
catchall=ON
cgi=ON
clamav=OFF
creator=root
cron=ON
date_created=Thu Dec  7 23:20:24 2023
demo=no
dnscontrol=ON
docsroot=./data/skins/evolution
domain=mydomain.nl
domainptr=unlimited
[email protected]
ftp=unlimited
git=OFF
inode=unlimited
ip=138.xx.xx.xx
jail=OFF
language=en
login_keys=ON
mysql=unlimited
name=admin
nemailf=unlimited
nemailml=unlimited
nemailr=unlimited
nemails=unlimited
notify_on_all_question_failures=yes
notify_on_all_twostep_auth_failures=yes
ns1=ns1.mydomain.nl
ns2=ns2.mydomain.nl
nsubdomains=unlimited
package=admin
php=ON
quota=unlimited
redis=OFF
security_questions=no
sentnotice_quota_full=no
sentwarning_bandwidth=no
sentwarning_inode=no
sentwarning_quota=no
skin=evolution
spam=ON
ssh=ON
ssl=ON
suspend_at_limit=OFF
suspended=no
sysinfo=ON
twostep_auth=no
user_widgets=WGT_USER_STATS:WGT_ADDITIONAL_DOMAINS
username=admin
usertype=admin
vdomains=unlimited
wordpress=OFF
zoom=100
 
Back
Top