linux sftp新建用户

1、步骤如下:

 

#Add a new group for sftp users
groupadd sftpusergroup

$add this to the sshd_config (编辑 /etc/ssh/sshd_config)

Match Group sftpusergroup
ChrootDirectory %h
ForceCommand internal-sftp

#restart sshd
/etc/init.d/sshd restart

#add a user
useradd -s /bin/false -G sftpusergroup testuser
passwd testuser

#root must own the user’s home directory for the chroot to work properly.
chown root ~testuser
#user must have permission to traverse the directory. testuser should already have group permission
chmod 750 ~testuser

 

2、一些linux用法解释:

 

 

 

chmod用法:

 

 

refurl:


 

http://www.envision-systems.com.au/blog/2012/04/12/setting-up-linux-user-accounts-for-sftp-without-shell-access/

http://bbs.chinaunix.net/thread-2248753-1-1.html

http://www.ezloo.com/2008/03/add_and_delete_user.html

 

http://bbs.chinaunix.net/thread-1547966-1-1.html 另一个人的新建用户的方法,感觉不错,未测试。

http://zhidao.baidu.com/link?url=ysCt7ZPcKkBXGek9VBW7wRnXnUSFYUXQdCcmHwSsENljaGC-ljAHzIcbW-FUFA3y2_T7B5Nn1GfPJDcNPiIP-K chmod用法

http://www.linuxso.com/command/chmod.html chmod用法

http://wangshuxing123-126-com.iteye.com/blog/695653 chmod用法

http://www.uzzf.com/news/7902.html 最开始的教程,可是一直不成功。

http://www.9usb.net/201005/linux-ls.html ls -l的用法以及含义

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值