• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Forwarded to devs chrooted system users out of sync on migration

Webstract

New Pleskian
TITLE:
chrooted FTP users out of sync on migration​
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:
Plesk Onyx Version 17.5
CentOS Linux 7.3.1611
​
PROBLEM DESCRIPTION:
Migrating from Server A to Server B breaks the access to the server over SSH. All our users were set to `bin/bash (chrooted)` prior to migration. After migration, users were still set to this but could not log in via SSH or SFTP.​
STEPS TO REPRODUCE:
To Reproduce
  1. Set up user with `bin/bash (chrooted)` access
  2. Migrate server
  3. Log into user on new server via SSH
  4. Cannot login
To Fix (manually)
  1. Change user to `bin/bash` and Apply or OK
  2. Change user back to `bin/bash (chrooted)` and Apply or OK
  3. Now use can log in
To Fix (script used to fix on 150+ users)
  1. See code below
  2. Note: this code was a temporary workaround for us. I am just sharing as an example.
Code:
#!/bin/bash
#pull chrooted users to scratch file
cat /etc/passwd|grep chroot > /tmp/chrootedusers.txt

#iterate, look for mismatches
while read line; do
 THISUID=`echo ${line} | cut -d: -f3`
 THISVHOSTDIR=`echo ${line} | cut -d: -f6`
 THISLOCALPWFILE="$THISVHOSTDIR/etc/passwd"
 OLDUID=`cat $THISLOCALPWFILE|grep -v "0:Root"|cut -d: -f3`
 echo "----------------------------------------"
if [ "$THISUID" != "$OLDUID" ]; then
 echo "MISMATCH:  $THISUID does not equal $OLDUID"
 echo $line
 echo "VHOST DIR: $THISVHOSTDIR"
 echo "PW FILE TO EDIT: $THISLOCALPWFILE"
 echo "Changing..."
 cat $THISLOCALPWFILE
 sed -i.lwbak "s/$OLDUID/$THISUID/" $THISLOCALPWFILE
 echo "Changed, original saved as .lwbak"
 cat $THISLOCALPWFILE
else
 echo "MATCH:  $THISUID equals $OLDUID"
 echo "No changes."
fi
done < /tmp/chrootedusers.txt

#remove scratch file
rm -fv /tmp/chrootedusers.txt
ACTUAL RESULT:
Error logging in.​
EXPECTED RESULT:
Successful login.​
ANY ADDITIONAL INFORMATION:
​
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:
Confirm bug​
 
Hello!
Could you please provide the following information:
1. Source panel and panel version
2. Command output:
grep exclude /usr/local/psa/var/modules/panel-migrator/sessions/<session_number>/debug.log
 
  1. Currently I am on Plesk Onyx Version 17.5.3 Update #7 (but this migration was a few versions earlier)
  2. I don't have that module installed anymore
 
Back
Top