- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How can I restrict users to access their own H...
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
09-07-2005 02:43 AM
09-07-2005 02:43 AM
How can I restrict users to access their own HOME directories ONLY?
How?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 03:05 AM
09-07-2005 03:05 AM
Re: How can I restrict users to access their own HOME directories ONLY?
Regards,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 03:08 AM
09-07-2005 03:08 AM
Re: How can I restrict users to access their own HOME directories ONLY?
You need to setup restricted shell for that user , with /usr/bin/rsh
You may have a look at this link:
http://newfdawg.com/SHP-RestShell.htm
Cheers ,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 03:19 AM
09-07-2005 03:19 AM
Re: How can I restrict users to access their own HOME directories ONLY?
check these links:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x4b278f960573d6
11abdb0090277a778c,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x6b165fe8b250d
71190080090279cd0f9,00.html
Regards,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 03:20 AM
09-07-2005 03:20 AM
Re: How can I restrict users to access their own HOME directories ONLY?
The rsh (restricted shell) is easier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 03:23 AM
09-07-2005 03:23 AM
Re: How can I restrict users to access their own HOME directories ONLY?
you are too fast for a simple Graduate ;-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 03:54 AM
09-07-2005 03:54 AM
Re: How can I restrict users to access their own HOME directories ONLY?
1. I can't use that user to ftp to his own home directory, which is a must:
530 User transfr access denied...
2. Although the user can't use "cd" after login, but he/she can list other directories and files, and read/vi them with full path...
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 05:13 AM
09-07-2005 05:13 AM
Re: How can I restrict users to access their own HOME directories ONLY?
>1. I can't use that user to ftp to his own home directory, which is a must:
Are you sure you put rksh in /etc/shells?
cta:/home/rgu $ ftp draco
Connected to draco.
220 draco FTP server (Version 1.1.214.4 Mon Feb 15 08:48:46 GMT 1999) ready.
Name (draco:vbe): rgu
331 Password required for rgu.
Password:
230 User rgu logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bye
221 Goodbye.
cta:/home/rgu $ echo $SHELL
/usr/bin/rksh
cta:/home/rgu $
>2. Although the user can't use "cd" after login, but he/she can list other directories and files, and read/vi them with full path...
Quite true! But this is only because you let that account do so...
From the mans:
rksh Only
rksh is used to set up login names and execution environments where
capabilities are more controlled than those of the standard shell.
The actions of rksh are identical to those of ksh, except that the
following are forbidden:
+ Changing directory (see cd(1))
+ Setting the value of SHELL, ENV, or PATH
+ Specifying path or command names containing /
+ Redirecting output (>, >|, <>, and >>)
The restrictions above are enforced after the .profile and ENV files
are interpreted.
When a command to be executed is found to be a shell procedure, rksh
invokes ksh to execute it. Thus, the end-user is provided with shell
procedures accessible to the full power of the standard shell, while
being restricted to a limited menu of commands. This scheme assumes
that the end-user does not have write and execute permissions in the
same directory.
When a shell procedure is invoked from rksh, the shell interpreter
specified with the #! magic inherits all the restricted features of
rksh. So, the shell procedures written for execution under rksh with
the intent of utilizing the full power of the standard shell should
not specify an interpreter with #!.
These rules effectively give the writer of the .profile file complete
control over user actions, by performing guaranteed set-up actions and
leaving the user in an appropriate directory (probably not the login
directory).
The system administrator often sets up a directory of commands
(usually /usr/rbin) that can be safely invoked by rksh. HP-UX systems
provide a restricted editor red (see ed(1)), suitable for restricted
users.
So start by customyzing the .profile!
I believe you have all the needed information to continue now...
Good luck and
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 11:07 AM
09-07-2005 11:07 AM
Re: How can I restrict users to access their own HOME directories ONLY?
But I still don't understand what I should do for the 2nd problem, how can I prevent users to list/read files outside their home directories, with .profile?
Could you please give me more detail about this?
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 04:52 PM
09-07-2005 04:52 PM
Re: How can I restrict users to access their own HOME directories ONLY?
Make a alias of cd like:
alias cd new_cd.sh
new_cd.sh
if ( "no. or arguments" = 0 )
then usage "..."
else
if ( $1 contains $HOME as a substring )
then cd $1
else cd $HOME
fi
I think this will work.
By the way what is chrooting guys?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2005 03:31 AM
09-08-2005 03:31 AM
Re: How can I restrict users to access their own HOME directories ONLY?
According to my question 1 above, about the ftp, what I did was:
(1). vi /etc/passwd, change shell from "/usr/bin/ksh" to "/usr/bin/rksh":
transfr:*:153:240:French Translator User,,,:/home/transfr:/usr/bin/rksh
(2). vi /etc/shells, add:
/usr/bin/rksh
Now, I can login via FTP, but I can "cd" back to the user's parent folders! Why?
ftp> cd ..
250 CWD command successful.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
...
It seems the restricted shell didn't work at all...
Please help, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2005 06:45 AM
09-08-2005 06:45 AM
Re: How can I restrict users to access their own HOME directories ONLY?
ftp> user transfr
530 User transfr access denied...
Login failed.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2005 12:18 AM
09-09-2005 12:18 AM
Re: How can I restrict users to access their own HOME directories ONLY?
thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2005 12:51 AM
09-09-2005 12:51 AM
Re: How can I restrict users to access their own HOME directories ONLY?
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=70367
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2005 02:24 AM
09-09-2005 02:24 AM
Re: How can I restrict users to access their own HOME directories ONLY?
I lack of time at the moment...
So what is most important now:
understanding what is going on or try to find an solution that works?
If second to make it short:
What are you tring to achieve?
That does that user need to accomplish his tasks?
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 03:35 AM
09-12-2005 03:35 AM
Re: How can I restrict users to access their own HOME directories ONLY?
Thanks!