Installing Update 1.9.1 performing clean-up process hung

Dear colleagues, I greet you all!
Happy New Year! All the best and may your wishes come true! May everyone have everything they wished for!

Good evening and good mood!
Today during the standard update
apt-get upgrade
The update of HCP 1.9.1 got caught
Yesterday 1.9.0 was installed and it was unexpected.
As a result, the console now displays the update process all day and is stuck on Installation tasks complete, performing clean-up…

=============================================================================
Hestia Control Panel Software Update Log
=============================================================================

OPERATING SYSTEM:      Ubuntu (22.04)
CURRENT VERSION:       1.9.1
NEW VERSION:           1.9.1
RELEASE BRANCH:        release
BUILD TYPE:            Production release

INSTALLER OPTIONS:
=============================================================================
Send email notification on upgrade complete:      true
Send installed log output to admin email:         false

=============================================================================
[ * ] Backing up existing templates and configuration files...
=============================================================================
[ ! ] Performing system health check before proceeding with installation...  
[ * ] Health check complete. Starting upgrade from 1.9.1 to 1.9.1...
=============================================================================

[ ! ] The latest version of Hestia Control Panel is already installed.
      Verifying configuration...

[ ! ] Updating default web domain templates...
[ ! ] Updating default mail domain templates...
[ ! ] Updating default DNS zone templates...
[ * ] File Manager is up to date (7.12.0)...
[ * ] Roundcube is up to date (1.6.9)...
[ ! ] Update Hestia PHP dependencies...
[ * ] Updating Cloudflare IP Ranges for NGINX...
[ * ] phpMyAdmin is up to date (5.2.2)...
=============================================================================
Installation tasks complete, performing clean-up...                          
=============================================================================
[ * ] Rebuilding user accounts and domains, this may take a few minutes...
      - admin...

I have a huge request, if anyone has already tried themselves in this process, please tell me the recipe for action.

With great hope and great respect, colleagues

Dear friends!

The process of rebuilding users hangs after the update

v-rebuild-users
The process freezes
I check the logs
There are no error messages

We try to rebuild manually
v-rebuild-user admin
It also freezes

Then we try

**v-rebuild-web-domain admin**
**v-rebuild-mail-domain admin**
**v-rebuild-dns-domain admin**

Everything is running correctly.

I would be very glad if you could summarize approximately where to look.
Thank you
With respect,

But are you facing any issues? Also, kindly update to V1.9.2, and see if this causes any issues on the same?

You can debug the script to know where it hangs:

bash -x /usr/local/hestia/bin/v-rebuild-user admin 2>&1 | tee /tmp/v-rebuild-user.debug
1 Like

I found the PID of the process that hangs and completed the
# kill -9 [PID]
Then I immediately received a message by email that version 1.9.2 was a successful update.
Then I doubted even more and went to the console to do it again and make sure
# v-rebuild-users
And again the process hung for an infinite time
Then I try to rebuild one by one for one user, then it works. But this is torture

Thank you very much for your advice.
This is what happens.
The result of execution was completed successfully.

+ echo '2025-03-16' 01:07:28 v-rebuild-user '\' 'admin' \ '''
+ exit
root@makc1: ~#

This inspired me and it seemed logical to me to run
bash -x /usr/local/hestia/bin/v-rebuild-users 2>&1 | tee /tmp/v-rebuild-users.debug
for everyone at once.

And here a surprise awaited me.
Execution stopped precisely at the rebuilding of the admin user, which had been successfully completed before.

And that’s all.
It still hangs.
It doesn’t make sense for me to restart
v-rebuild-user admin
, because it was just completed successfully.
And where it hangs now, I have a hard time understanding.

Please, friends, at least give me a hint in the direction.
I’m already very tired, I’ve been sitting with this question for about a week.

I’ll be very grateful
Thank you

Dear colleagues, please give me your opinion, should it be like this or is my case isolated?
The matter with my question remains a problem.
I run the script
v-rebuild-user admin
with debugging

The script hangs on the attempt to change the shell nologin

I take the command
The password entry question returns.
I suggest the user password Admin
Not suitable.
I check the user in the system and his password, there is both a user and a password hash.

image

Is it possible to allow script execution without PAM Authentication?

sudo chsh -s /usr/sbin/nologin admin --force

Friends, please help me decide
Is the repair suitable?
Or will I have to install a new HestiaCP

Thank you to all those who care

It’s strange that sudo asks for a password when executed as root.

How did you switch to root from your regular user?

Does a simple command also ask for a password?
sudo ls -l

Show the sudoers contents:

grep -Ev '^$|^#' /etc/sudoers

What happens when you execute this command as root (not using sudo)?

/usr/bin/chsh -s "/bin/sh" "admin"

Thank you for your reply

I go into the console as root

image

Thanks for your help,
Respectfully,

Show the contents of this file:

cat /etc/pam.d/chsh

And please, don’t use screenshots, copy and paste the text, select it and click on button </> to format it correctly.

root@makc1:~# cat /etc/pam.d/chsh
#
# The PAM configuration file for the Shadow `chsh' service
#

# This will not allow a user to change their shell unless
# their current one is listed in /etc/shells. This keeps
# accounts with special shells from changing them.
auth       required   pam_shells.so

# This allows root to change user shell without being
# prompted for a password
auth            sufficient      pam_rootok.so

# The standard Unix authentication modules, used with
# NIS (man nsswitch) as well as normal /etc/passwd and
# /etc/shadow entries.
@include common-auth
@include common-account
@include common-session

root@makc1:~#

Looks fine, so I don’t know why it is asking for a password…

sudo chsh -s /usr/sbin/nologin admin --force
Maybe as an experiment, is it safe to try?

You can try but it should work the way Hestia uses it.

Just in case, show the output of this command:

cat /etc/shells
root@makc1:~# cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/usr/bin/sh
/bin/dash
/usr/bin/dash
/usr/bin/screen
/usr/sbin/nologin
root@makc1:~#

It’s weird that neither bash nor jailbash are in the list. They should be there.

Forgive my lightness.
For two weeks now, this question has been creating background noise in my brain. Fatigue is taking its toll )
Maybe I should just update the list and add the missing parts?

This is the list in a default Ubuntu Noble with Hestia 1.9.2:

❯ cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/usr/bin/sh
/bin/bash
/usr/bin/bash
/bin/rbash
/usr/bin/rbash
/bin/dash
/usr/bin/dash
/sbin/nologin
/usr/sbin/nologin
/usr/sbin/jailbash

Thank you, friends!
I got expert experience and became stronger)
Thanks to you, your support and my own efforts.
Now my feelings are overwhelmed with pride!
The issue has been successfully resolved!
Everything works!

Thank you, Friends!
All the best to you,
Money-making interesting work,
More female attention to the male community))

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.