Operating System - HP-UX
1748223 Members
4696 Online
108759 Solutions
New Discussion юеВ

how to create one user account which only can ftp and cannot telnet

 
SOLVED
Go to solution
Eric  Unix
Frequent Advisor

how to create one user account which only can ftp and cannot telnet

how to create one user account which only can ftp and cannot telnet

BR
eric
Look forward
19 REPLIES 19
Suraj K Sankari
Honored Contributor
Solution

Re: how to create one user account which only can ftp and cannot telnet

Hi,

Just edit the last field of that users entry at /etc/passwd file

example
smith:*:100:100:8A-74(office):/home/smith:/usr/bin/sh

make it
smith:*:100:100:8A-74(office):/home/smith:/usr/bin/false

now smith can't login via telnet or ssh.

Suraj
Ganesan R
Honored Contributor

Re: how to create one user account which only can ftp and cannot telnet

Hi,

Normally user shell is defining where the user should go upon login. If you specify null shell (/usr/bin/false), then that user cannot get any shell.

When you create a user specify null shell.

#useradd -s /usr/bin/false username
Best wishes,

Ganesh.
Eric  Unix
Frequent Advisor

Re: how to create one user account which only can ftp and cannot telnet

Hello Sirs

Thanks for your kind inputs, but i cannot ftp or fstp now after change " :/usr/bin/sh " to " :/usr/bin/false " .

The error show up -->
Fatal : unable to initialise SFTP : could not connect

Please help me

BR
eric
Look forward
Taifur
Respected Contributor

Re: how to create one user account which only can ftp and cannot telnet

Hi Eric & Unix,

You can do it from sam and give the user permission for ftp and deiny perpermission for telnet.


Rgds//
Taifur
Dennis Handly
Acclaimed Contributor

Re: how to create one user account which only can ftp and cannot telnet

>I cannot ftp or fstp now after change to /usr/bin/false.

You'll probably have to include that in /etc/shells.
Eric  Unix
Frequent Advisor

Re: how to create one user account which only can ftp and cannot telnet

Hello Dears

Which function in sam , wouldy you kindly give the path of sam . Thanks a lot.

BR
eric
Look forward
Eric  Unix
Frequent Advisor

Re: how to create one user account which only can ftp and cannot telnet

Hello Daniel

How to "You'll probably have to include that in /etc/shells" .

Thanks a lot
Look forward
Suraj K Sankari
Honored Contributor

Re: how to create one user account which only can ftp and cannot telnet

Hi,

You can modify this file /etc/shells if /usr/bin/false is not there then open this file and add this line /usr/bin/false
save the file and try...

Suraj
Suraj K Sankari
Honored Contributor

Re: how to create one user account which only can ftp and cannot telnet