nixCraft Linux / UNIX / Shell Scripting Forum

nixCraft

Linux / UNIX Tech Support Forum

user as chrooted enviorment

This is a discussion on user as chrooted enviorment within the Linux software forums, part of the Linux Getting Started category; HI sir, I want to setup two thing with linux normal user 1. how to make user as readonly --> ...


Register free or login to your account to remove all advertisements.

Go Back   nixCraft Linux / UNIX / Shell Scripting Forum > Linux Getting Started > Linux software

Linux answers from nixCraft.


Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here.

Reply

 

Thread Tools Display Modes
  #1 (permalink)  
Old 28th August 2006, 05:31 PM
Junior Member
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
gaurav_verm123
Default user as chrooted enviorment

HI sir,

I want to setup two thing with linux normal user

1. how to make user as readonly
--> i can set readonly as filesystem partition and also i can give file OR directory permission as readonly for any user, but still
i have problem if i set permission on file like chmod 774 <path>
then all users which belong to other having same permission Read only.
or if i create group and make user as secondary member of that group having same issue.
for example
ls -ld /oracle

drwxr_ _ r_ _ root grp1 .... ... ... /oracle
for example clear that /oracle dir having group grp1, and
useradd -G grp1 test
for this command the test user is secondary group member of grp1 grup,
and /oracle having read on grp1 , so test user having read only permission.


ISSUE---->How to make user as read-only( without partition AS read only and file or directory as read only )
AND way to make user to restict access all file and directory apart from his HOME directory(user only access his home dir )

OR can i make user as chrooted enviorment in his home dir , so it will create and access only in his home directory ( not like ftp chrooted env),
this is normal linux user.
Reply With Quote
  #2 (permalink)  
Old 28th August 2006, 09:35 PM
Junior Member
 
Join Date: Aug 2006
Location: del
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
preygool
Default

You can use rbash i.e. restricted bash shell. A restricted shell is used to set up an environment more controlled than the standard shell. It behaves identically to bash with the exception that the following are disallowed or not performed:Changing directories with cdSetting or unsetting the values of SHELL, PATH, ENV, or BASH_ENVSpecifying command names containing /Specifying a file name containing a / as an argument to the . builtin commandSpecifying a filename containing a slash as an argument to the -p option to the hash builtin commandImporting function definitions from the shell environment at startupParsing the value of SHELLOPTS from the shell environment at startupRedirecting output using the >, >|, <>, >&, &>, and >> redirection operatorsUsing the exec builtin command to replace the shell with another commandAdding or deleting builtin commands with the -f and -d options to the enable builtin commandUsing the enable builtin command to enable disabled shell builtinsSpecifying the -p option to the command builtin commandTurning off restricted mode with set +r or set +o restricted.These restrictions are enforced after any startup files are read. When a command that is found to be a shell script is executed, rbash turns off any restrictions in the shellspawned to execute the script.Open /etc/passwd file and setup shell to /bin/rbash# vi /etc/passwdFor example here is a sample entry for user vivek:vivek:100:101::/home/vivek:/bin/rbashSave and close the file.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Add normal user / FTP user usein NORMAL user(non-root) anilvrathod Shell scripting 0 7th December 2007 06:04 PM
how to enable a user and disabling a user narasimha.reddygnv Shell scripting 1 31st March 2007 12:31 AM


All times are GMT +5.5. The time now is 08:56 PM.


Powered by vBulletin® Version 3.8.6 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40