UTERMINAL
TERMINAL
NEXT
$V1$
PAUSE
ENCORE5
BOX
ILLUSTRATION
GO
Assuming that the user george is to operate
in a restricted shell, his entry in the
/etc/passwd file would be as shown above.
root:sfshnNwQSjnpE:0:0::/:/bin/sh
cron:X:1:2::/:
admin::2:0::/:/bin/adminsh
bin:X:3:3::/:
uucp::4:4::/usr/spool/uucp:/usr/lib/uucp/uucico
network:X:7:7::/usr/spool/micnet:
yori:nRfPQoxTi52WI:101:100::/usr/yori:/bin/sh
michael:WCSLzdMC9uvsE:102:100::/usr/miked:/bin/sh
guest::150:200::/usr/demo:/bin/rsh
george::151:200::/usr/george:/bin/rsh
Note that the HOME/login program is /bin/rsh!
The .profile or .login file for the user
george will have the form similar to the one shown above.
cat .profile
PATH=.:/usr/rbin:/usr/george/bin
export PATH
SHELL=/bin/rsh
export SHELL
The commands in the /usr/rbin directory are as shown above.
ls /usr/rbin
cat
pwd
echo
ls
Note that the restricted user may execute the
commands only in his own directory or in the
the directory /usr/rbin; of course, commands
must be copied into those directories!
The cd command is built into the Shell itself
so you don't need to (nor can you) put it into the
/usr/bin directory.
Let us see the result when a cd is attempted by
a restricted user typing cd /usr/bin
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type cd /usr/bin
Please type cd /usr/bin
You will be helped this time!
$PROMPT$
FORGET1
cd /usr/bin
Observe the result on the terminal!
cd: restricted
$PROMPT$