1824976 Members
3861 Online
109678 Solutions
New Discussion юеВ

ftpaccess and ftpd

 
SOLVED
Go to solution
Thayanidhi
Honored Contributor

ftpaccess and ftpd

Hi,

I just want disable some users from using ftp, without changing any current functionality.
Can some one post the entries to be kept in ftpaccess and modification to inetd.conf?

Right now no ftpaccess file.

Regds
TT
Attitude (not aptitude) determines altitude.
11 REPLIES 11
Orhan Biyiklioglu
Respected Contributor

Re: ftpaccess and ftpd

http://newfdawg.com/SHP-FTP-ftpaccess.htm

"Securing the FTP service on HP-UX: Introduction to the ftpaccess file"

is a good source about this topic.
Orhan Biyiklioglu
Respected Contributor

Re: ftpaccess and ftpd

You should also check the ftphots file.
man 4 ftphots

Its format is like:

[allow|deny] username host(s)

So,

deny root *

should deny root login from anywhere.
Orhan Biyiklioglu
Respected Contributor

Re: ftpaccess and ftpd

Sorry for the typo the file should be ftphosts
Sergejs Svitnevs
Honored Contributor

Re: ftpaccess and ftpd

Hi,

You can prohibit incoming incoming ftp from a specific IP address (deny option in ftpaccess).
Use of ftpaccess is disabled by default. To enable ftpaccess, set "ftpd -a" flag in inetd.conf, then "inetd -c".

I suggest you download WU-FTPD from software.hp.com and do this here with a combination of the /etc/shells, /etc/group, and ftpaccess files.

Regards,
Sergejs
Raj D.
Honored Contributor

Re: ftpaccess and ftpd

Hi Thayanidhi ,

You can check the /etc/ftpd/ftpaccess file for details.
Attached.

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Muthukumar_5
Honored Contributor

Re: ftpaccess and ftpd

If you want to disable useraccounts to use ftp then you have to choose ftphosts file only.

# cat /etc/ftpd/ftphosts
username

# chmod 444 /etc/ftpd/ftphosts
# chown bin:bin /etc/ftpd/ftphosts

You can use another method as,

#!/bin/ksh
#ftpnew.ksh
if [ "$LOGNAME" = "" ]
then
echo "No Access to other users for using ftp"
sleep 1
fi

chmod 755 /usr/bin/ftpnew.ksh
chown bin:bin /usr/bin/ftpnew.ksh
alias ftp=/usr/bin/ftpnew.ksh

hth.
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor
Solution

Re: ftpaccess and ftpd

Create a file called "ftpusers" in /etc/ftpd and chown bin:bin. Enter the usernames you want to disable access from using FTP.

#cat /etc/ftpd/ftpusers
root
abcd

Here, root and abcd cant access FTP.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Matthew_50
Valued Contributor

Re: ftpaccess and ftpd

modify inetd.conf is not require.
1. touch /etc/ftpd/ftpusers
2. for example, user 'root'&'matt' is not allow to access system via ftp login, then
place like following in /etc/ftpd/ftpusers.

------------ example ---------------------
# cat /etc/ftpd/ftpusers
root
matt
------------ example ---------------------
Muthukumar_5
Honored Contributor

Re: ftpaccess and ftpd

/etc/ftpd/ftpusers file useful when you want to control remote machine user login to local ftpd server.

-- Plz look at ftpusers man page --

ftpd rejects remote logins to local user accounts that are named in /etc/ftpd/ftpusers.


If you want to control ftp client access to users then you have to use script wrapper on ftp binary to use it.

hth.
Easy to suggest when don't know about the problem!
morganelan
Trusted Contributor

Re: ftpaccess and ftpd

Thayanidhi
Honored Contributor

Re: ftpaccess and ftpd

Hi,
Thanks all for the reply. I go with ftpusers, which is very easy without changing anything else.

Regds
TT
Attitude (not aptitude) determines altitude.