iT邦幫忙

DAY 9
3

HP-UX管理實務經驗系列 第 8

能否於HP-UX環境限制使用者只能FTP,但不能用Telnet登入系統?

分享ITRC一個針對帳號管控的討論經驗
[簡單做法](但不安全,如有其他user也設定使用/user/bin/false的shell話)
/etc/passwd of /usr/bin/false. THen add /usr/bin/false to /etc/shells.

[安全做法]

  1. Create a normal user account (user=xxxx group=none)
  2. Make /usr/bin/false as the start-up program
  3. The entry in password file should look something like
    xxxx:chus5tya:233:20:,,,:/home/xxxx/./:/usr/bin/false
  4. Make sure /usr/bin/false is coded in /etc/shells
  5. Create the file /etc/ftpd/ftpaccess and put in the following lines ..
    class all john,guest
    guestgroup none
    noretrieve /etc/passwd
  6. Perform a man on ftpaccess if you are not sure about the format
  7. Perform chmod 444 ftpaccess

chown bin:bin ftpaccess

  1. Edit /etc/inetd.conf & add "-a" argument to ftpd, its illustrated below
    ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -a
  2. inetd -c

  3. Create the following sub-dirs and files
    a) ~xxxx/usr

chown ???R bin:bin usr

chmod 555 usr

b) ~xxxx/usr/bin

chown root bin

chmod 555 bin

cp -p /sbin/ls ~xxxx/usr/bin/ls


上一篇
管理者root密碼,改成一個裡面有"@"字元的字串,結果無法登入,該如何處理?
下一篇
HP-UX如何用舊版的kernel檔案開機?
系列文
HP-UX管理實務經驗18

尚未有邦友留言

立即登入留言