Ubuntu prohibits FTP users from logging on to the system

Source: Internet
Author: User
This year, our company used Ubuntu servers and previously used CentOS. In the afternoon, I set up a community for the company and set up an FTP. In consideration of security, the FTP user is prohibited from logging on to the system. I set the FTP User shell such as ftp1 to nologin, I couldn't log on to the test FTP. I found that there are many differences between Ubuntu and CentOS, and there are some differences in apache configuration. The company's server system is Ubuntu11.10. # Whichnologin/

This year, our company used Ubuntu servers and previously used CentOS. In the afternoon, I set up a community for the company and set up an FTP. In consideration of security, the FTP user is prohibited from logging on to the system. I set the FTP User shell such as ftp1 to nologin, I couldn't log on to the test FTP. I found that there are many differences between Ubuntu and CentOS, and there are some differences in apache configuration. The company's server system is Ubuntu 11.10.

# Which nologin

/Usr/sbin/nologin

# Vim/etc/shells

#/Etc/shells: valid login shells
/Bin/csh
/Bin/sh
/Usr/bin/es
/Usr/bin/ksh
/Bin/ksh
/Usr/bin/rc
/Usr/bin/tcsh
/Bin/tcsh
/Usr/bin/esh
/Bin/dash
/Bin/bash
/Bin/rbash
/Usr/bin/screen
No/usr/sbin/nologin found

Therefore, after this file,/usr/sbin/nologin is added.

# Usermod-s/usr/sbin/nologin ftp1

# Su-ftp1
This account is currently not available. You cannot log on to the system. The FTP logon is successful.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.