Unsuspending user account through ssh

van helsing

Verified User
Joined
Aug 23, 2012
Messages
40
Hello

Please suggest me how to unsuspend an user acount through ssh?
My direct admin license has expired.
I need to unsuspend the account but not able to unsuspend through panel.
 
Hello,

Does /usr/local/directadmin/dataskq give you any error? If it does, then manual un-suspending might be not that simple.
Nevertheless, I don't have a guide for that, and that might not a trivial task. Why don't you pay your lic?
 
no error after running /usr/local/directadmin/dataskq.
License renewal is taking time and I need to unsuspend it urgently.
 
You might need to manually change

Code:
suspended=yes

to

Code:
suspended=no

in /usr/local/directadmin/data/users/<username>/user.conf

and in domains/domain.com.conf

Code:
active=yes

Code:
suspended=no

and rewrite apache configs. It will enable site only.

Also, you might need manually to unsuspend email, ftp, and system password... sorry no time to write all the things in details.
 
Hello,

If you want DA to unsuspend things for you.. there are 2 methods.

1) If the User was suspended due to bandwidth over-usage, just reset his account, and the tally should take care of it:
Code:
echo "action=reset&value=[b]username[/b]&type=user" >> /usr/local/directadmin/data/task.queue

2) If you had manually suspended the account, then it will be "OFF" in the user.conf:
Code:
account=OFF
change this value to be "ON".. so that DA will unsuspend based on bandwidth (since he's probably below it) when the tally is run.

John
 
Following the 2nd method on manual suspension of account......Just by changing value to ON is not solving the purpose.
As the zEitEr said above , We have to change user.conf along with domain.com.conf and also manually unsuspend email, ftp, and system password for user.
 
Last edited:
You might need to manually change

Code:
suspended=yes

to

Code:
suspended=no

in /usr/local/directadmin/data/users/<username>/user.conf

and in domains/domain.com.conf

Code:
active=yes

Code:
suspended=no

and rewrite apache configs. It will enable site only.

Also, you might need manually to unsuspend email, ftp, and system password... sorry no time to write all the things in details.

Hello,

A user is manually suspended en unsuspended a couple of times is now only able to use http. FTP and MYSQL are still unavailable.
How do I unsuspend email, ftp, and system password (FreeBSD)

Thanks
 
Assuming we're just talking about full DA User suspension:

1) Email should just be:
/etc/virtual/domain.com_off

rename that to:
/etc/virtual/domain.com

2) Ftp is in /etc/proftpd.passwd. There will be ! characters in front of the suspended account password crypts.
Remove the ! characters for the related accounts, and save.

3) System email account might have a suspended password in:
/home/user/.shadow
do the same thing with the ! character.. remove it.

4) The system account itself, for FreeBSD would be:
Code:
pw unblock [B]username[/B]
5) MySQL is again the same thing.. you'd need to login to /phpMyAdmin as da_admin, go to the mysql.user table, and remove the ! characters.
After activing those Users, run the SQL query:
Code:
FLUSH PRIVILEGES
I'd still recommend you do it through DA though, as I might have missed something, plus there are plenty of cache files that needs to be updated, etc.. but that's the jist of it.


OR

In DA just suspend the account, then unsuspend the account.. which will shake everything back to the way it should be.

John
 
Hi John,

Thanks, This made everything work again.
I was not able to unsuspend in DA. It says "unable to lock user"
 
Back
Top