Operating System - HP-UX
1833871 Members
1709 Online
110063 Solutions
New Discussion

Re: Restricted access to a user...

 
Dayanand Naik
Frequent Advisor

Restricted access to a user...

Hi,

My qts is can i restrict a user only for telnet access. and not for ftp access. Is it possible.

do i have to add the user name in the ftpusers file or should i have host.equiv file for the same.

Suggestion welcomed

Regards,
Dayanand Naik.
Dayanand Naik
4 REPLIES 4
Sridhar Bhaskarla
Honored Contributor

Re: Restricted access to a user...

Dayanand,

Your question is slightly confusing. Is it that you want to restrict the user using telnet/ftp from the system or to the system?.

If it is to the system ( which I think), then you need to put his/her userid in /etc/ftpd/ftpusers file. For ex., if the entries are like
root
ftp
my_user

Then people cannot use these ids to ftp to the system.

If it is the other way, you need to use rsh to restrict people using ftp command.

hosts.equiv is not to restrict users but to allow login without a password. So, please do not bother about this file.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: Restricted access to a user...

Dayand,

Didn't this solve your problem?

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Shahul
Esteemed Contributor

Re: Restricted access to a user...

Hi

I have a solution for this. First U go to /etc/passwd and change the shell of the user whome U want to restric telnet to /bin/false. But here is a limitation that this particular user will not be able to login from anywhere. Then edit /etc/shells and add /bin/false line in this.

Now try ftp with this user name, it will work, But not telnet or rlogin.


Best of luck

Shahul
linuxfan
Honored Contributor

Re: Restricted access to a user...

Hi Dayanand,

If you want to allow a user to be able to telnet in but prevent that user from ftp'ing you can modify the ftpusers file but the question i had was if you are allowing telnet, then the user can ftp out of the system.

Do you want to prevent ftping both in and out of the system?
In that case you will have to modify the /etc/inetd.conf and comment out the ftp line and reread your conf file (inetd -c) and at the same time change the permissions of ftp (/usr/bin/ftp) and/or group ownership so only users belonging to a certain group can execute ftp.

Just my thoghts
-Ramesh
They think they know but don't. At least I know I don't know - Socrates