PDA

View Full Version : Strange shutdown after removing user


bladetmc
01-29-2007, 07:48 AM
I removed some users from the system and most went ok, but 2 users have a strange problem, wich result in shutdown and no way of restarting the httpd server.

Both users had only an index.html standing and no active mailboxes and nothing modified to the account.

After deleting the user the webserver shutted down claiming the user (but that should have been removed while deleting that user).

From the loggin only "not very usefull" info was found:

2007:01:29-15:23:01: service httpd wasn't running, starting it
2007:01:29-15:23:01: Error starting service httpd : uid 0 gid 0 : /etc/init.d/httpd start >>/dev/null 2>>/dev/null
2007:01:29-15:23:11: service httpd didn't start, re-starting it
2007:01:29-15:23:11: Error restarting service httpd : uid 0 gid 0 : /etc/init.d/httpd restart >>/dev/null 2>>/dev/null

Only fast way to resolve this was adding the user again with the same username/password and then the webserver restarded.

But where can i find the exact info why this error is caused or have other ppl the same problem with certain users?

DirectAdmin Support
01-29-2007, 02:57 PM
The "Include" lines for the users are stored in the /etc/httpd/conf/httpd.conf.
Upon use deletion, but the include line and the httpd.conf that is being included should be removed from the file.

If you see "bad user username", then something failed in that process. The system user account was successfully deleted, but the deleting of /usr/local/directadmin/data/users/username would have failed, since the httpd.conf that stores the username still exists.

Possible causes for that.. if there is a lock on the /etc/httpd/conf/http.conf file preventing DA from accessing it (possibly another action process on the file), then DA might be aborting the whole httpd removal process.

There is a check added to the task.queue that should look likeaction=confirm&type=httpd.conf&value=/usr/local/directadmin/data/users/username/httpd.confadded to the /usr/local/directadmin/data/task.queue right after the user is deleted. It checks to see if the user/files exists or not and ensures the lines are correct based on that. Something isn't quite right if that's getting thrown off.

Perhaps there is a delay in writing things to disk..causing confusion with the checks.. I'm not too sure.

You can run DA in debug mode:cd /usr/local/directadmin
/etc/init.d/directadmin stop
./directadmin b200to see what it's doing.
The /var/log/directadmin/error.log would also be a good place to check for errors.

Try adding/remove some users to see if you can duplicate the problem with the debug on.

John