※ 引述《godman362.bbs@ptt.cc (卯)》之銘言:
> 請教一下,目前手上有一台主機系統是Ubuntu 10.04
> 想要建一個公用帳號給所有人 上傳/下載 實驗室資料用途
> 並不想讓他們登入主機,也就是不開ssh的登入權限
> 但是想使用sftp作為資料傳輸的協定
> 請問有辦法這樣作嗎?
Reda this: http://www.debian-administration.org/articles/94
Sometimes you want to have users, that have access to files on your server,
but don't want them to be able to log in and execute commands on your server.
This is done quite easily.
Add user as usually and assign him a password. Then run the following command
(replace the 'username' with real user name):
root@host # usermod -s /usr/lib/sftp-server username
This changes user's shell to sftp-server.
The last step for this to work is to add '/usr/lib/sftp-server' to
/etc/shells to make it a valid shell, eg. like this:
root@host # echo '/usr/lib/stfp-server' >> /etc/shells
There. Now you've setup a user who can only access your server with SFTP.
--
╭ 東華電機‧後山星城 bbs.ee.ndhu.edu.tw ─
├ 文章來源﹢ymu041-045.ym.edu.tw
--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
推
11/19 02:40, , 1F
11/19 02:40, 1F
→
11/19 02:40, , 2F
11/19 02:40, 2F
→
11/19 21:51, , 3F
11/19 21:51, 3F
→
11/22 15:32, , 4F
11/22 15:32, 4F
討論串 (同標題文章)