- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to create one user account which only can ftp ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 01:01 AM
04-16-2009 01:01 AM
BR
eric
Solved! Go to Solution.
- Tags:
- telnet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 01:08 AM
04-16-2009 01:08 AM
SolutionJust 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 01:14 AM
04-16-2009 01:14 AM
Re: how to create one user account which only can ftp and cannot telnet
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
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 01:36 AM
04-16-2009 01:36 AM
Re: how to create one user account which only can ftp and cannot telnet
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 01:43 AM
04-16-2009 01:43 AM
Re: how to create one user account which only can ftp and cannot telnet
You can do it from sam and give the user permission for ftp and deiny perpermission for telnet.
Rgds//
Taifur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 01:56 AM
04-16-2009 01:56 AM
Re: how to create one user account which only can ftp and cannot telnet
You'll probably have to include that in /etc/shells.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 02:05 AM
04-16-2009 02:05 AM
Re: how to create one user account which only can ftp and cannot telnet
Which function in sam , wouldy you kindly give the path of sam . Thanks a lot.
BR
eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 02:16 AM
04-16-2009 02:16 AM
Re: how to create one user account which only can ftp and cannot telnet
How to "You'll probably have to include that in /etc/shells" .
Thanks a lot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 02:23 AM
04-16-2009 02:23 AM
Re: how to create one user account which only can ftp and cannot telnet
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 02:24 AM
04-16-2009 02:24 AM
Re: how to create one user account which only can ftp and cannot telnet
find similar thread in below link.
http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1239877142211+28353475&threadId=957193
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 02:30 AM
04-16-2009 02:30 AM
Re: how to create one user account which only can ftp and cannot telnet
Just use vi on that file and add that line. If not there, you'll need to add the default shells:
/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/keysh
You may want to leave out those r* shells. (And the scummy C shell, just to discourage it's use. ;-)
- Tags:
- scummy C shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 03:34 AM
04-16-2009 03:34 AM
Re: how to create one user account which only can ftp and cannot telnet
Steps are little different for sftp. If you are using sftp use the shell opt/ssh/utils/sftponly instead of /usr/bin/false.
entry in password file should look like this..
user1:x:149:20:SFTP only user:/home/user1:/opt/ssh/utils/sftponly
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 04:14 AM
04-16-2009 04:14 AM
Re: how to create one user account which only can ftp and cannot telnet
> How to "You'll probably have to include that in /etc/shells" .
You might be amazed how questions like this can be answer by querying the manpages.
# man shells
...offers the principal insight, and following its "see also" references:
# man man getusershell
...tells you even more!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 08:26 AM
04-16-2009 08:26 AM
Re: how to create one user account which only can ftp and cannot telnet
Thanks for all of your help, and it work now . But if i want to user sftp. I found there are no " opt/ssh/utils/sftponly " in my current system. How to make it available ?
BR
thanks a lot.
ERIC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 08:40 AM
04-16-2009 08:40 AM
Re: how to create one user account which only can ftp and cannot telnet
> I found there are no " opt/ssh/utils/sftponly " in my current system. How to make it available ?
If you have Secure SHell installed you should have this:
# swlist|grep -i "secure shell"
T1471AA A.05.10.006 HP-UX Secure Shell
If you need this, then see:
http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 08:47 AM
04-16-2009 08:47 AM
Re: how to create one user account which only can ftp and cannot telnet
and add those users to whom u want to give sftp access to that file
-uvk
Like it or worked !! Click kudos !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 06:04 PM
04-16-2009 06:04 PM
Re: how to create one user account which only can ftp and cannot telnet
After add "/opt/ssh/utils/sftponly" in passwd file and touch /opt/ssh/utils/sftponly file
But show up error " access denied " after key in password in sftp tool
Please kidnly help me .
BR
eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 07:02 PM
04-16-2009 07:02 PM
Re: how to create one user account which only can ftp and cannot telnet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2009 09:04 PM
04-16-2009 09:04 PM
Re: how to create one user account which only can ftp and cannot telnet
Are you able to do ssh into the box, if yes then check the file permission which you create now, what is the permission now?
check this also is there any # (hash) mark there in file /etc/ssh/sshd_config
Subsystem sftp /usr/libexec/openssh/sftp-server
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2009 01:32 AM
04-17-2009 01:32 AM
Re: how to create one user account which only can ftp and cannot telnet
Just touch the file is not enough.
#swlist |grep -i secure
T1471AA A.04.50.009 HP-UX Secure Shell
It should list like above. If not I would advice you to download and install HP secure shell from here..
http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA
That will create all the necessary files for you.
Ganesh.