- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- help for a jailed user
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
02-07-2006 04:55 AM
02-07-2006 04:55 AM
help for a jailed user
I created a jailed user by the simplest way -- using restricted shell.
I also changed /etc/ftpd/ftpaccess in order to be a GUEST ftp user. So, its home directory is similar to
/dirA/./dirB
My problem is that I have to grant write permission for its home dir (/dirA/dirB) and this means the user can modify/delete its .profile file. Therefore, that user can edit its .profile and include a 'cd' command in it for jumping to any other directory in the tree (according to shell man pages, restrictions to shell are enforced AFTER reading user's .profile):
The restrictions above are enforced after the .profile and ENV files are interpreted.
Any other simple ideas ?
P.D: I decided to use restricted shell to prevent create a STRONG jailed user (using sudo and chroot)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2006 05:18 AM
02-07-2006 05:18 AM
Re: help for a jailed user
The user is not properly jailed if all the user can just modify his/her .profile and get out of jail.
You have changed ftp access, which is a good start. For FTP to work right in a chroot jail, a few binaries like ls need to be copied locally.
The user should NOT have write permission on .profile. The chroot commands and setup can be performed there. The user may need a normal shell to execute needed comands but if the user is in chroot without the ability to change .profile the user is stuck.
chroot doesn't work really well if the user needs to use applications that require access to the root of the system.
Secure shell and chroot environments:
http://docs.hp.com/en/T1471-90013/ch01s13.html
Chroot in general
http://unix.derkeiler.com/Mailing-Lists/HP-UX-Admin/2003-06/0034.html
It may seem complex, but its really not once you do it a few times.
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-07-2006 05:29 AM
02-07-2006 05:29 AM
Re: help for a jailed user
"The user should NOT have write permission on .profile"
I agree. This can be accomplised if owner is root, for example. But if user has permission to write in its home directory, it can delete the .profile owned by root and create a new one owned by him.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2006 06:06 AM
02-07-2006 06:06 AM
Re: help for a jailed user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2006 06:11 AM
02-07-2006 06:11 AM
Re: help for a jailed user
Why not use acl...
Chan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2006 07:40 AM
02-07-2006 07:40 AM
Re: help for a jailed user
What entries shoud I use ?