Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

BUG: Suspend option lock all accounts

General questions about VestaCP
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
kijamve
Posts: 7
Joined: Thu May 15, 2014 3:27 pm

BUG: Suspend option lock all accounts
  • Quote

Post by kijamve » Sun Jul 05, 2015 1:55 am

Hi, i suspend an account (ingeniumve) and all accounts in my vps is locked (and root user!), see the auth.log:


Jul 4 19:51:57 cuado sudo: admin : TTY=unknown ; PWD=/usr/local/vesta/web/suspend/user ; USER=ro
ot ; COMMAND=/usr/local/vesta/bin/v-suspend-user ingeniumve
Jul 4 19:51:57 cuado usermod[23409]: lock user 'ingeniumve' password
Jul 4 19:51:57 cuado usermod[23417]: lock user 'root' password
Jul 4 19:51:57 cuado usermod[23512]: lock user 'bind' password
Jul 4 19:51:57 cuado usermod[23517]: lock user 'fetchmail' password
Jul 4 19:51:57 cuado usermod[23522]: lock user 'sshd' password
Jul 4 19:51:57 cuado usermod[23527]: lock user 'syslog' password
Jul 4 19:51:57 cuado usermod[23532]: lock user 'klog' password
Jul 4 19:51:57 cuado usermod[23537]: lock user 'smmta' password
Jul 4 19:51:57 cuado usermod[23542]: lock user 'smmsp' password
Jul 4 19:51:57 cuado usermod[23562]: lock user 'dovecot' password
Jul 4 19:51:57 cuado usermod[23567]: lock user 'dovenull' password
Jul 4 19:51:57 cuado usermod[23572]: lock user 'ftp' password
Jul 4 19:51:57 cuado usermod[23577]: lock user 'admin' password
... one line by user ...
Top

kijamve
Posts: 7
Joined: Thu May 15, 2014 3:27 pm

Re: BUG: Suspend option lock all accounts
  • Quote

Post by kijamve » Sun Jul 05, 2015 2:07 am

This commit is wrong:

https://github.com/serghey-rodin/vesta/ ... 83d3181fe7

Fix is:

for ftp in $(grep ^`echo $user`_.* /etc/passwd| cut -f 1 -d : ); do


To unlock all accounts, execute this command (re-suspend all accounts after this fix):

for fix in $(grep ^.* /etc/passwd| cut -f 1 -d : ); do
/usr/sbin/usermod --unlock $fix
done
Top

b1tg0d
Posts: 15
Joined: Mon Mar 03, 2014 9:07 pm

Re: BUG: Suspend option lock all accounts
  • Quote

Post by b1tg0d » Sat Sep 05, 2015 2:35 pm

I had the exact same issue. I could not SSH because even [root] was locked. Is there a permanent fix for this bug? I don't want to suspend an account again until I know it won't lockout root again.

For anyone who wants to suspend an account you should first login as root then:

nano /usr/local/vesta/bin/v-suspend-user

change
for ftp in $(grep ^$user_.* /etc/passwd| cut -f 1 -d : ); do

to
for ftp in $(grep ^`echo $user`_.* /etc/passwd| cut -f 1 -d : ); do

ctrl+x and save the file.

If you did suspend an account, and got locked out - once you have root access again run the fix script kijamve wrote above. Thanks kijamve for finding this hopefully the fix will be in the next Vesta update.
Top

peshte
Posts: 7
Joined: Sat Jun 07, 2014 10:17 am

Re: BUG: Suspend option lock all accounts
  • Quote

Post by peshte » Tue Sep 15, 2015 6:39 pm

Same bug here.
But, I run the command v-unsuspend-user on a user (which was not suspended), and all the passwords were restored.
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

cron

Login  •  Register

I forgot my password