[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1405
  • Last Modified:

disable shell - enable proftpd

debian woody
proftpd

i have enabled DefaultRoot ~ for ProFTPd

I wish to disable shell access for a given user and allow ftp access only.

best/easiest way to acheive this?

thanks
0
basko
Asked:
basko
  • 4
  • 2
1 Solution
 
yuzhCommented:
Just created an account as a normal user account. But instead of
a shell,(/bin/csh, /bin/bash, ...) just put /bin/false as the
shell and that user won't be able to do shell login (eg, use telnet etc)

0
 
baskoAuthor Commented:
it seems that when I do this  the ftp login fails also!?
0
 
yuzhCommented:
Can you using ftp when it has a normal shell (/bin/csh, /bin/bash, ...).
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
yuzhCommented:
I don't has debian + ProFTPd, you can try the followings:

create a file /bin/ftpaccess

echo 'echo "This account is for ftp access only"' > /bin/ftpaccess

chmod a+x /bin/ftpaccess to give it execution rights

Add /bin/ftpaccess into the /etc/shells file
*It is important to have the other shells there as well

create an account that you want to have the ftp access only and for its shell, put /bin/ftpaccess

You will have to set the rights to the directory that you want the account go to.

If you try to telnet to that account, you will get the message "This account is for ftp access only".




0
 
baskoAuthor Commented:
that seems to do the trick

i had to add #!/bin/bash at the head of the ftpaccess script

root can login to the account using su -s /bin/bash

thanks
0
 
yuzhCommented:
For security reason, you should not allow root to do ftp. IF you have to allow
root to do FTP, use secure shell instead. (ssh comes with secure FTP, sftp).

Cheers!
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now