View Full Version : Serious Error! How to recover?

12-27-2004, 02:41 AM
This is the error i get when i login to direct admin on any account.

Unable to determine Usertype
user.conf needs to be repaired

What should i do to repair user.conf?

Please help.

12-27-2004, 04:06 PM
It would appear that the account information for that file has become corrupt. :rolleyes:

Are you the administrator or the user?
If the later, you should contact your hosting provider with this information so they can fix it since there's nothing we can do if thats the case.

If you are the administrator, you may be able to rebuild the conf file using one of the other conf files from another use as an example from the /usr/local/directadmin/data directory....

01-31-2005, 01:53 AM
If you are seeing line after line of the following in your /var/log/directadmin/error.log, then the following may apply to you:
Unable to determine usertype for user admin. user.conf needs to be repairedNote that each line is preceded by a datestamp.

There is a known issue which occurs after upgrading to the latest software (as of this writing). This problem occurs because ownership of the /usr/local/directadmin/data/users/admin directory is set "root.root" rather than "diradmin.diradmin".

# chown diradmin.diradmin /usr/local/directadmin/data/users/adminOnce that is fixed, you should be able to log on again...

01-01-2006, 10:10 AM
Same issue here. None of given (re-chown) fixes seem to work out.

This issue probably started with tonight's cronjob. There was probably a full hard disk while DirectAdmin was doing his SysBk-thing.

Not any directadmin user is able to log in. I'm quite convinced that my directadmin-ownership/permission-settings are correct.

drwx--x--x 8 diradmin diradmin 4096 Jan 1 18:02 data
drwx--x--x 119 diradmin diradmin 4096 Dec 27 19:14 users
[root@server01 users]# ls -al
total 476
drwx--x--x 119 diradmin diradmin 4096 Dec 27 19:14 .
drwx--x--x 8 diradmin diradmin 4096 Jan 1 18:02 ..
drwx--x--x 3 diradmin diradmin 4096 Jan 1 04:20 aaa
drwx--x--x 4 diradmin diradmin 4096 Jan 1 18:05 admin
drwx--x--x 3 diradmin diradmin 4096 Jan 1 05:01 bbb
etc... all the same.

01-01-2006, 12:25 PM
There is a script in /usr/local/directadmin/scripts that will set the permissions back again. set_permissions.sh or something similar.

I'm just not sure if it will handle existing data or only the parent directories.

DirectAdmin Support
01-01-2006, 05:35 PM

That can happen if you have full hard drive. DA does first write to a different file, then renames it to the user.conf (when written), only if all bytes were written, but I have still seen some cases where the user.conf file still gets emptied.

To fix it, you can run (for an Admin named 'admin'):
cd /usr/local/directadmin/scripts
./fix_da_user admin adminThe 1st option is the username, 2nd argument is the usertype (admin|reseller|user), and the 3rd optinal option is a domain, should the account have a domain.


01-11-2006, 10:17 AM
I tried that, but it makes user 'admin' just a mear user instead of an admin.

I have sent you multiple e-mails. Please log in into the server and have a look. The data-files are currently untouched, since they got corrupted. They seem to contain all the correct data.

Please take a look at my server, things don't seem very obvious.

07-01-2006, 11:17 AM
what is the syntax if users have multiple domains ?


DirectAdmin Support
07-01-2006, 11:27 AM
same syntax.. just run the script several times per domain. The script adds what's missing, so running it multiple times during hurt anything.

As a followup for the previous poster, if the admin because just a "User", that means the 2nd parameter probably wasn't set to "admin". In any case, you can simply edit:
and set:


01-01-2007, 04:24 PM
How can I get this script if I don't see it in the DA scripts directory?

DirectAdmin Support
01-01-2007, 04:33 PM

The script is actually called "fix_da_user.sh" with the .sh at the end. If you don't have it, check the version of DA you are using. Update to the latest version. If you still don't have it, let us know which OS you are using so I can double check the script is in the package.


01-01-2007, 04:34 PM
Check the attachment! :)

Rename fix_da_user.sh.txt to fix_da_user.sh, chmod it to 700 and use it :)

01-01-2007, 04:37 PM
I'm on Debian 3.1 with the latest DA and I dont have that script.

01-01-2007, 04:39 PM
keefe007, check my attachment.

DirectAdmin Support
01-01-2007, 04:43 PM
Thanks, it will be in the next release of the debian package.