- 论坛徽章:
- 0
|
如何开没有shell只能ftp的账号?急!!
新建文件\r\n#!/bin/sh\r\n#\r\n# ftponly shell\r\n#\r\ntrap \"/bin/echo Sorry; exit 0\" 1 2 3 4 5 6 7 10 15\r\n#\r\nIFS=\"\"\r\nAdmin=access@host.some.domain\r\nSystem=`/usr/ucb/hostname`@`/usr/bin/domainname`\r\n#\r\n/bin/echo\r\n/bin/echo \"********************************************************************\"\r\n/bin/echo \" You are NOT allowed interactive access to $System.\"\r\n/bin/echo\r\n/bin/echo \" User accounts are restricted to ftp and web access.\"\r\n/bin/echo\r\n/bin/echo \" Direct questions concerning this policy to $Admin.\"\r\n/bin/echo \"********************************************************************\"\r\n/bin/echo\r\n#\r\n# C\'ya\r\n#\r\nexit 0\r\n\r\n另存到/bin或者/usr/bin,/usr/local/bin,权限设为755\r\n不管放到哪个目录要确认你的用户的环境变量PATH里有此目录\r\n然后在/etc/shells里加上/bin/ftponly(所建立的shell名称) |
|