Serious Error! How to recover?

SpikeySpy

New member
Joined
Dec 27, 2004
Messages
1
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.
 
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....
 
If you are seeing line after line of the following in your /var/log/directadmin/error.log, then the following may apply to you:
Code:
Unable to determine usertype for user admin.  user.conf needs to be repaired
Note 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".

Code:
# chown diradmin.diradmin /usr/local/directadmin/data/users/admin
Once that is fixed, you should be able to log on again...
 
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.

Code:
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.
 
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.
 
Hello,

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'):
Code:
cd /usr/local/directadmin/scripts
./fix_da_user admin admin
The 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.

John
 
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.
 
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:
/usr/local/directadmin/data/users/admin/user.conf
and set:
usertype=admin

John
 
How can I get this script if I don't see it in the DA scripts directory?
 
Hello,

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.

John
 
Check the attachment! :)

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

Attachments

  • fix_da_user.sh.txt
    9.7 KB · Views: 369
Back
Top