最近刚学Linux,想要在Linux上配置一个ftp服务器,就用源码编译安装了一个2.1.2版本的vsftpd。安装过程还好,在配置的过程中就遇到了一些问题,以下配置过程及解决方法:
1.方法一:
先创建一个系统用户,然后修改/etc/passwd文件
命令如下(mytest是用户名):
#先创建一个系统用户并设置密码
[root@localhost home]#useradd mytest
[root@localhost home]#passwd mytest
[root@localhost home]# passwd mytest
Changing password for user mytest.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
这样设定后的用户有系统权限,通过下面的方法来去除用户的系统权限
#修改/etc/passwd文件
[root@localhost etc]# cd /etc
[root@localhost etc]# vi passwd
#找到刚才添加的用户(mytest)并修改如下,之前要确保文件夹/home/mytest已存在
mytest:x:501:5