Deleted users still in users.list

donkeyKICK

Verified User
Joined
Jul 24, 2007
Messages
387
For some reason, when I deleted some users yesterday, they stayed in "users.list" and are displayed as options for the admin backup/restore.

I can delete them from the list manually, but why aren't they automatically removed from users.list when I deleted the users?
 
Did you wait till nightly crons run to see if that removed them?
 
Yes, I did. I removed them during the day, and then noticed the problem the next day.
 
Dunno then check error logs if there is nothing then email directadmin support and ask whats up.
 
I didn't see anything in the error log, I manually removed them from the list, but it would be nice if it would do that automatically when I remove the user.
 
It's done it automatically for me. I'm guessing it has for scsi as well and that's why he suggested you might want to contact DirectAdmin Support.

Jeff
 
I found the following code, and found it worked really well to clean them all up:

make a file called fix.sh
Code:
[FONT=Courier New][SIZE=2][COLOR=#228b22][FONT=Courier New][SIZE=2][COLOR=#228b22]
[SIZE=2][FONT=Courier New][COLOR=#228b22][FONT=Verdana][COLOR=#000000]cd /usr/local/directadmin/data/users[/COLOR][/FONT][/COLOR][/FONT][/SIZE][FONT=Courier New][COLOR=#228b22]
[SIZE=2][FONT=Verdana][COLOR=#000000]for r in `ls */reseller.conf | cut -d/ -f1`; do[/COLOR][/FONT][/SIZE]
[SIZE=2][FONT=Verdana][COLOR=#000000]{[/COLOR][/FONT][/SIZE]
[SIZE=2][FONT=Verdana][COLOR=#000000]    echo "fixing Reseller $r ...";[/COLOR][/FONT][/SIZE]
[SIZE=2][FONT=Verdana][COLOR=#000000]    echo -n '' > $r/users.list[/COLOR][/FONT][/SIZE]
[SIZE=2][FONT=Verdana][COLOR=#000000]    for u in `grep creator=$r */user.conf | cut -d/ -f1`; do[/COLOR][/FONT][/SIZE]
[SIZE=2][FONT=Verdana][COLOR=#000000]    {[/COLOR][/FONT][/SIZE]
[SIZE=2][FONT=Verdana][COLOR=#000000]        ISUSER=`grep -c usertype=user $u/user.conf`[/COLOR][/FONT][/SIZE]
[SIZE=2][FONT=Verdana][COLOR=#000000]        if [ "$ISUSER" = "1" ]; then[/COLOR][/FONT][/SIZE]
[SIZE=2][FONT=Verdana][COLOR=#000000]            echo $u >> $r/users.list[/COLOR][/FONT][/SIZE]
[SIZE=2][FONT=Verdana][COLOR=#000000]        fi[/COLOR][/FONT][/SIZE]
[SIZE=2][FONT=Verdana][COLOR=#000000]    };[/COLOR][/FONT][/SIZE]
[SIZE=2][FONT=Verdana][COLOR=#000000]    done;[/COLOR][/FONT][/SIZE]
[SIZE=2][FONT=Verdana][COLOR=#000000]};[/COLOR][/FONT][/SIZE]
 
[/COLOR][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]

I never did find the original cause.
 
Back
Top