vsFTPd - Additional users and additional FTP users can't connect to FTP server

Questions regarding the FTP Server
vsFTPd, ProFTPd
rajbdilip
Posts: 9
Joined: Mon Jul 18, 2016 1:50 am

vsFTPd - Additional users and additional FTP users can't connect to FTP server

Postby rajbdilip » Fri Feb 24, 2017 2:21 pm

Any additional FTP user or new user that I create from VestaCP cannot connect to FTP server while root and admin can.

/var/log/auth.log shows the following error:

Code: Select all

Feb 24 14:09:26 diliprajbaral sshd[13957]: User admin_diliprajbaral not allowed because shell /sbin/nologin does not exist
Feb 24 14:09:26 diliprajbaral sshd[13957]: input_userauth_request: invalid user admin_diliprajbaral [preauth]
Feb 24 14:09:27 diliprajbaral sshd[13957]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=63.141.198.16  user=admin_diliprajbaral
Feb 24 14:09:29 diliprajbaral sshd[13957]: Failed password for invalid user admin_diliprajbaral from 63.141.198.16 port 39644 ssh2
Feb 24 14:09:29 diliprajbaral sshd[13957]: Connection closed by 63.141.198.16 [preauth]

Here admin_diliprajbaral is an additional FTP user.

/etc/passwd shows the following:

Code: Select all

admin:x:1000:1000:xxxxxx@gmail.com:/home/admin:/bin/bash
admin_diliprajbaral:x:1000:1000::/home/admin/web/diliprajbaral.com:/sbin/nologin
gbiplesh:x:1001:1001:xxxxx@gmail.com:/home/gbiplesh:/sbin/nologin

Here, admin_diliprajbaral is an additional FTP user and gbiplesh is an user.

I suspect it has something to do with /sbin/nologin but I do not know that it means. So, how can I get these FTP accounts to work? Plus how can I get new accounts work as soon as they are created without any manual fixes?

UPDATE:
Editing /etc/passwd to change /sbin/nologin fixes the problem. But why is this happening by default?

skamasle
Collaborator
Posts: 378
Joined: Mon Feb 29, 2016 6:36 pm

Re: vsFTPd - Additional users and additional FTP users can't connect to FTP server

Postby skamasle » Fri Feb 24, 2017 10:24 pm

Hi

The problem is here

Code: Select all

Feb 24 14:09:29 diliprajbaral sshd[13957]: Failed password for invalid user admin_diliprajbaral from 63.141.198.16 port 39644 ssh2
Feb 24 14:09:29 diliprajbaral sshd[13957]: Connection closed by 63.141.198.16 [preauth]


You try connecto whit SFTP in FTP accounts

By defaul FTP accounts cant use SFTP just FTP, only main vestacp user can use SFTP / SSH access, so admin user, or any vestacp user

Aditional FTP accounts cant access to FTP because this are only for FTP access i suppose this is made to improve security.

Aditional FTP accounts are limited so, not access whit those to to SFTP / SSH

This accounts are limited to web space -> /home/admin/web/diliprajbaral.com

So if you do SSH access they can access also orther website accounts, in this case you not need create new aditional FTP account just use main user account in this case admin.


And that is the point, why you need create aditional FTP if then you leave it grant access to all orther websites whit SSH / SFTP access.


Return to “FTP Server”



Who is online

Users browsing this forum: Google [Bot] and 2 guests