LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on...

Notices

Reply
 
LinkBack Search this Thread
Old 12-18-2007, 02:53 AM   #1
nthillaiarasu
Member
 
Registered: Nov 2007
Posts: 39

Rep: Reputation: 15
How to restrict the users in linux


Hi currently my requirement is that i am having 3 users in my suse linux in that user 1 should not view the folder of user 2 unless he is having the root access .How to do this please help me

Thanks in Advance
 
Old 12-18-2007, 03:07 AM   #2
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 70
One option is to change permissions on their home directory from something like 755 to 700.
 
Old 12-18-2007, 06:52 AM   #3
nthillaiarasu
Member
 
Registered: Nov 2007
Posts: 39

Original Poster
Rep: Reputation: 15
How to restrict users in linux not entering into the filesystem

In linux operating systems everey user can able to view the files in terminal with read access,but they cant able to write the file.But if you want to make other users not read your home and file system then we have to configure the user account with Restricted Shell

Restricted Shell


The next degree of limitation is to be a restricted shell. In this case, a version of a normal bash shell will prevent users from changing the directory and environment variables, redirecting output, running commands with absolute pathnames, using exec command and some other actions. Restrictions are not enforced for shell scripts. See man bash for more details. Combining rbash with a restrictive configuration of UNIX permissions can help achieve further security.

Rbash is a viable choice if you are trying to somewhat contain trusted users. Its restrictions can be easily overcome (see below).

To test rbash restricted shell functionality:


# adduser nst

# ln -s /bin/bash /bin/rbash

# echo "/bin/rbash" >> /etc/shells

# chsh -s /bin/rbash nst

# cd ~nst

# su nst

$

and then:
$ cd /
rbash: cd: restricted
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Restrict what commands users can use? jasone *BSD 1 11-30-2006 06:50 AM
ProFTPd restrict all users to /fs ? dbc001 Slackware 12 07-28-2006 04:49 PM
restrict/allow ssh users mike30188 Linux - Security 2 06-20-2005 08:37 PM
restrict unix users to ~ novaprime Linux - Software 20 01-25-2005 11:41 PM
How to restrict email from users... Supp0rtLinux Linux - Software 1 01-08-2003 03:37 AM


All times are GMT -5. The time now is 06:18 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration