- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- restrict userid to execute FTP command only
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
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
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
тАО02-03-2004 07:12 AM
тАО02-03-2004 07:12 AM
I want to use this ID to manually execute ftp jobs from another server (Microsoft) to a HPUX server. To set this up, I would do this:
-in /etc/passwd, set the user's home directory to /bin/false
-in the /etc/shells directory, add /bin/false
A bit more information, the user will login using the jobftp ID, but the only command this user ID can execute is ftp.
Is this the best way to do this?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2004 07:17 AM
тАО02-03-2004 07:17 AM
Re: restrict userid to execute FTP command only
Set him up with the shell '/usr/bin/rsh' and give him profile only to look at certain path. For ex., Create a directory /home/jobftp with .profile containing only the following line
PATH=/usr/restrict/bin
Change the ownership of this file to root:bin with only 400 permissions.
Copy /usr/bin/ftp into /usr/restrict/bin. Do not add anything to it.
Now the user, after logs in can only execute ftp command.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2004 07:17 AM
тАО02-03-2004 07:17 AM
Re: restrict userid to execute FTP command only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2004 07:21 AM
тАО02-03-2004 07:21 AM
SolutionIf you make it /bin/false, then the user cannot login. So, the best way is to make the shell as /usr/bin/ftp and add /usr/bin/ftp to /etc/shells.
The user logs in and gets an ftp prompt. He|she will have to type "o systemname" etc.,etc
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2004 07:56 AM
тАО02-03-2004 07:56 AM
Re: restrict userid to execute FTP command only
I would want things structured so the user is in a chroot jail. That means the user's home directory is root. Thats if you allow a telnet/ssh login at all, which you currrently are not doing.
The user can't cd up to the real root.
In this scenario the user may need an actual home directory thats in position to access the files you want the user to access.
Under your current setup the user can not log on with telnet. So the only way in or out is by ftp.
Other things to consider.
Why use ftp at all.
Authentication is clear text.
Why not use a Secure Shell which includes a secure ftp server for the server side.
You'll need a client for the Microsoft side and that will cost a few dollars.
http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2004 08:27 AM
тАО02-03-2004 08:27 AM
Re: restrict userid to execute FTP command only
Best of luck.
Regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2004 05:43 AM
тАО02-05-2004 05:43 AM
Re: restrict userid to execute FTP command only
By the way, can the /etc/passwd file be edited directly?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2004 05:46 AM
тАО02-05-2004 05:46 AM
Re: restrict userid to execute FTP command only
Now with "vi". YOu will need to use 'vipw' to edit the passwd file. It sets the appropriate locks so that another session won't change the password file simultaneiously.
YOu can also do a "chsh" command to change the shell. For ex.,
chsh jobftp "/usr/bin/ftp"
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2004 05:47 AM
тАО02-05-2004 05:47 AM
Re: restrict userid to execute FTP command only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-06-2004 06:21 AM
тАО02-06-2004 06:21 AM
Re: restrict userid to execute FTP command only
Attached find the HP doc we have used for ftp only account setups.
Best of luck.
Best regards,
dl