Kamis, 03 Mei 2012
Membuat user hanya "ftp" di solaris
1. Create user
# useradd -d /export/home/userftp -g staff -c "Ftp user only" -m -s /bin/false userftp
2. Cek user yang dibuat
# more /etc/passwd
userftp:x:502:10:Ftp user only:/export/home/userftp:/bin/false
3. Create password userftp
# passwd userftp
New Password:
Re-enter new Password:
passwd: password successfully changed for userftp
4. Create file /etc/shells, secara default file ini belum ada dalam system
a) Jika sudah ada, edit file,
# vi /etc/shells
--dan tambahkan:
/bin/false
b) Kalau belum ada lakukan terlebih dahulu
ls /bin/*sh > /etc/shells
kemudian lakukan langkah 4.a
# more /etc/shells
/bin/bash
/bin/tcsh
/bin/zsh
/bin/false
5. Sekarang test fungsi login userftp tanpa memiliki akses telnet and ssh.
# ftp localhost
Connected to localhost.
220 EXT FTP server ready.
Name (localhost:root): userftp
331 Password required for userftp.
Password:
230 User userftp logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> by
221-You have transferred 0 bytes in 0 files.
221-Total traffic for this session was 220 bytes in 0 transfers.
221-Thank you for using the FTP service on EXT.
221 Goodbye.
# telnet localhost
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
login: userftp
Password:
Last login: Fri May 4 10:26:42 from 192.168.205.207
Connection to localhost closed by foreign host.
# ssh userftp@localhost
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
19:03:47:d6:51:4a:55:3e:af:64:fb:18:9e:40:ce:37.
Please contact your system administrator.
Add correct host key in /.ssh/known_hosts to get rid of this message.
Offending key in /.ssh/known_hosts:2
RSA host key for localhost has changed and you have requested strict checking.
Host key verification failed.
SEMOGA BERHASIL!!!
Selengkapnya..
Langganan:
Postingan (Atom)