mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
Fix for additional accounts on Ubuntu and Debian
This commit is contained in:
parent
845e5f95d4
commit
aace12f63f
2 changed files with 14 additions and 8 deletions
|
@ -322,8 +322,15 @@ rebuild_web_domain_conf() {
|
|||
# Checking ftp
|
||||
if [ ! -z "$FTP_USER" ]; then
|
||||
if [ -z "$(grep ^$FTP_USER: /etc/passwd)" ]; then
|
||||
/usr/sbin/adduser -o -u $(id -u $user) -g $user -s /sbin/nologin \
|
||||
-M -d "$HOMEDIR/$user/web/$domain" $FTP_USER > /dev/null 2>&1
|
||||
shell='/sbin/nologin'
|
||||
if [ -e "/usr/bin/rssh" ]; then
|
||||
shell='/usr/bin/rssh'
|
||||
fi
|
||||
/usr/sbin/useradd $FTP_USER \
|
||||
-s $shell \
|
||||
-o -u $(id -u $user) \
|
||||
-g $user \
|
||||
-M -d "$HOMEDIR/$user/web/$domain" > /dev/null 2>&1
|
||||
|
||||
# Update password
|
||||
shadow=$(grep "^$FTP_USER:" /etc/shadow)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue