Sitedetout - Tutoriels informatiques

Create User That Can Only FTP in Solaris

1. Create an FTP user and set the password.

# useradd -d /export/home/ftpuser -m -s /bin/sh -c “User That Can FTP Only” ftpuser
 
# passwd ftpuser
New Password:
Re-enter new Password:
passwd: password successfully changed for ftpuser

2. Change the shell /bin/bash to /bin/false in /etc/passwd file to disable the ftpuser from logging using telnet, ssh or rlogin.

• The default /etc/passwd will be looked like this:

# more /etc/passwd

userftp:x:xxxx:xx:User That Can FTP Only:/export/home/ftpuser:/bin/bash

• Then, change it to be like this:

# more /etc/passwd

userftp:x:xxxx:xx:User That Can FTP Only:/export/home/ftpuser:/bin/false
 
3. Create /etc/shells file and /bin/false line.
# vi /etc/shells
/bin/false

4. Test the connection.

# ftp
# telnet
# ssh
# rlogin
 


Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Chargement...

Powered by sitedetout.com