AIXThis forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have some users that will be FTPing into a box to upload images for a website. I want the users to be locked in their respective image directories. What would be the best way to go about this?
My thought was to create the users and put a symlink in their home directories to their image directory. Then lock them in the home directory. Is their a better way? (Also, how do I lock them in the directory?)
You want to set up a chroot'd environment for ftp, so the users see the images directory as their root directory. I haven't done this on AIX myself, but it is pretty much the same as for Linux and other UNIXs so you can look around for how-tos.
How do I assign Rsh to the given userID? I am able to call it from the command line, but it only stays for that session. As soon as I logout its no longer applied.
Not sure if i understood you correctly, if you were asking how to assign Rsh to a userID, here's how it can be done:
Method 1:
Well, you can use smitty user, select the option to show/change user characteristics, you can see the Initial Program -> you can point it to /usr/bin/Rsh instead of the default ksh.
(Be sure to check if /usr/bin/Rsh exists in your system)
Method 2:
You may also want to do the direct way by just modifying the /etc/passwd file, the last entry in the line delimited by ':' to the path /usr/bin/Rsh.
Below shows an example for restricting userA to the designated ftp directory in /etc/passwd file:
Originally posted by zorba4 @duanyu : my browser did not like the doc_...icted_ part of the link you gave
(http://publibn.boulder.ibm.com/doc_...icted_shell.htm).
Could you find the full link name, or give the way you reached it ?
Clicking on the link worked for me.
Rsh is effectively the bourne shell (bsh) in restricted mode. If users prefer the korn shell, you can also use ksh -r to invoke ksh in restricted mode.
Quote:
rksh is used to set up login names and execution environ-
ments whose 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 disallowed:
o changing directory (see cd(1))
o setting the value of SHELL, ENV, or PATH
o specifying path or command names containing /
o redirecting output (>, >|, <>, and >>)
o changing group (see newgrp(1)).
The restrictions above are enforced after .profile and the
ENV files are interpreted.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.