CHROOT(8) BSD System Manager's Manual CHROOT(8)NAME
chroot -- change root directory
SYNOPSIS
chroot [-u -user] [-g -group] [-G -group,group,...] newroot [command]
DESCRIPTION
The chroot utility changes its current and root directories to the supplied directory newroot and then exec's command, if supplied, or an
interactive copy of the user's login shell.
If the -u, -g or -G options are given, the user, group and group list of the process are set to these values after the chroot has taken
place. See setgid(2), setgroups(2), setuid(2), getgrnam(3) and getpwnam(3).
Note, command or the shell are run as your real-user-id.
ENVIRONMENT
The following environment variable is referenced by :
SHELL If set, the string specified by SHELL is interpreted as the name of the shell to exec. If the variable SHELL is not set, /bin/sh is
used.
SEE ALSO chdir(2), chroot(2), environ(7), jail(8)HISTORY
The chroot utility first appeared in 4.4BSD.
SECURITY CONSIDERATIONS
chroot should never be installed setuid root, as it would then be possible to exploit the program to gain root privileges.
BSD January 24, 2002 BSD
Check Out this Related Man Page
CHROOT(8) BSD System Manager's Manual CHROOT(8)NAME
chroot -- change root directory
SYNOPSIS
chroot [-u -user] [-g -group] [-G -group,group,...] newroot [command]
DESCRIPTION
The chroot command changes its root directory to the supplied directory newroot and exec's command, if supplied, or an interactive copy of
your shell.
If the -u, -g or -G options are given, the user, group and group list of the process are set to these values after the chroot has taken
place. See setgid(2), setgroups(2), setuid(2), getgrnam(3) and getpwnam(3).
Note, command or the shell are run as your real-user-id.
ENVIRONMENT
The following environment variable is referenced by chroot:
SHELL If set, the string specified by SHELL is interpreted as the name of the shell to exec. If the variable SHELL is not set, /bin/sh is
used.
SEE ALSO chdir(2), chroot(2), environ(7)HISTORY
The chroot utility first appeared in 4.4BSD.
SECURITY CONSIDERATIONS
chroot should never be installed setuid root, as it would then be possible to exploit the program to gain root privileges.
4.3 Berkeley Distribution October 6, 1998 4.3 Berkeley Distribution
In my organization in order for anyone to go to any Unix server they have to go through "SERVER A" and login as themselves.
Then people are free to go enywhere they please.
For example:
SERVER A, loggs in as himself
telnets to SERVER B, loggs in as guest
telnets to SERVER C, loggs in as... (8 Replies)
hi, this echo $SHELL will give the shell name.. how to get the other list of variables (besides SHELL) values?
and also, different shells have different variable names (example SHELL) (10 Replies)
Hey everyone, I need a little help....
I need to add my root user to a new group I have created, I'm just alittle unsure how to do this.
I know I need to use the 'useradd' command, the user 'root' needs to be added to a new group called 'beoper' and retain his membership in the following... (7 Replies)
In unix prompt when i run following command ...
# current user is "aaa" (not root)
# I want to run some command with "bbb" user then i using
su - bbb -c "command"
# Then, my shell request for user "bbb" password before running command
If I want to add this command to shell script which... (5 Replies)
Is is possible switch user from a non-root user to root user without entering the password interactively inside a korn shell script which is run by a non-root user?
e.g. I have a non-root user called infodba who is in dba group and I want to create a shell script which is executed by infodba... (5 Replies)
Hi all, i hope i got this in the right place, what i am trying to do is make a program only run by root, ie
for instance user fred is logged in and uses firefox, what id like to do is change that so that when fred wants to use firefox he will be asked to enter root password before he is allowed to... (14 Replies)
Hi all,
I am using RHEL 5.0
I need a user say test to have full access to two directories, say /tmp1 & /tmp2 only other than his home directory.
I do not want to change his login shell which is ksh or bash by default.
Moreover, he should not even have read access of other directories.
... (10 Replies)
Hey there
I have a problem and i was hoping that you guys could help me out
I want to copy a user privileges to a group and i need to copy all privileges(Recursively) every directory with all its sub directories and I tried some solution and it did not work. I used the following command:-
... (14 Replies)
hello
I would like to create another user like root
With smit user, I have duplicate all the configuration from root to root2 (groupe, secondary group, administrative, etc...)
But when I connect with root2, i don't go to all directory: "permission denied !"
I don't understand where is the... (10 Replies)
Hi All,
How to prevent root user from doing setuid().
In otherwords, if the root(any user) is trying to do setuid in a program it should fail. (5 Replies)
Hi,
Please tell me how to include parallel processing for the below code. Thanks in advance
I have a list of users directories in root directory. Each user has a directory by his /her username.
I am finding the size of each directorry using du -g command.. and checking if the size exceeds 3GB a... (6 Replies)
I have a simple sandbox program which runs a command as user "nobody" in a chroot jail. It sets resource limits with setrlimit, changes the user id with setuid, changes the root dir with chroot, and then calls exec to execute the command given as command line parameters. It is of course a... (8 Replies)
I am completely new to Shell scripting and I have almost no idea what I'm doing here. I'm not a stranger at all to programming, but the way SHELL is done drives me to insanity. Here's my current issue:
1. We are to create a BASH script called rafactor.sh
This program takes in two (or three)... (6 Replies)
Hi,
I'm the root user on my computer, but I'm writing a script that does a lot of file handling. Every time I create a file or directory it automatically requires root privileges. Is there a way I can just create a file that the user can access without a password?
For example in my script I... (20 Replies)