The data in /usr/local/directadmin/data/users is gone. I need to create it again.

A script has been created to create the default data for users. All values will be set to unlimited, so you'll need to set any limits you want after the user account is recreated.

To obtain the script, run

cd /usr/local/directadmin/scripts
wget -O fix_da_user.sh http://www.directadmin.com/fix_da_user.sh
chmod 755 fix_da_user.sh

To create a user and domain, run it as:

./fix_da_user.sh username user domain.com

Where the bold items will be replaced with the actual values.

To create a reseller, run it as:

./fix_da_user.sh username reseller

Note that you can pass the domain as a 3rd argument if you wish to create a domain with the reseller.

For admins:

./fix_da_user.sh username admin

Note that the script will not create a system user or modify any files under the user's' home directory. It's only to restore the data in /usr/local/directadmin/data/users so that the users can at least login.

If you want to change the any of the following values, you have to edit the script and change them (set near the top)

creator ip n1 ns2 package

If you have too many users to run fix_da_user.sh for each one, you can create this script in the scripts directory to get the user and domain from the /etc/virtual/domainowners file to create everything automatically:

#!/bin/sh

for i in `ls /usr/local/directadmin/data/users`; do
{
  echo "doing $i"
  for j in `grep ": $i" /etc/virtual/domainowners | cut -d: -f1`; do
  {
    echo "dmn: $j";

    ./fix_da_user.sh $i user $j

  };
  done;


  echo "";
};
done;
 
troubleshooting/data.txt · Last modified: 2010/04/29 09:14 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Please visit Automatic Backlinks to start earning free backlinks Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki