Welcome to the most active Linux Forum on the web.
Go Back > Forums > Other *NIX Forums > *BSD
User Name
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.


  Search this Thread
Old 11-30-2006, 04:02 AM   #1
Registered: Oct 2004
Location: Sweden
Distribution: FreeBSD, OpenBSD, Debian Etch
Posts: 160

Rep: Reputation: 30
Restrict what commands users can use?


Edit: I use FreeBSD 6.1 and OpenBSD 4.0 on my servers.

Is there a way to control what commands users can use? I would like some users to only have the ability to use cd, ls, nano or vi, mkdir, rm and cat (maybe some more). I want a trusted group to be able to use screen, irc, centericq, wget and links as well. Can I do this without a jail?

Thanks in advance!

Last edited by jasone; 11-30-2006 at 07:29 AM.
Old 11-30-2006, 07:50 AM   #2
Senior Member
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Ubuntu, FreeBSD
Posts: 1,449

Rep: Reputation: 48
Yes you can, but you'll be working on changing file permissions throughout the file system.

find / -type f -exec chmod o-x {} \; -print
This assumes you use tcsh, you need to use \{\} if you use bash. Then add a couple of groups, one for the class of user you want. And chgrp each program you want them to be able to use. You must make sure that the people in the higher access group are also in the lower access group.

This is the old-school way of doing it. And is not very complicated from a minimalist approach.

Keep in mind that when you upgrade the base system or reinstall a port, all these settings are going to get screwed up. So you may want to create a script to automatically fix the settings after upgrades.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
ProFTPd restrict all users to /fs ? dbc001 Slackware 12 07-28-2006 05:49 PM
restrict/allow ssh users mike30188 Linux - Security 2 06-20-2005 09:37 PM
restrict unix users to ~ novaprime Linux - Software 20 01-26-2005 12:41 AM
restrict space for some users in directories CleonII Linux - Security 5 02-25-2004 11:08 AM
How to restrict email from users... Supp0rtLinux Linux - Software 1 01-08-2003 04:37 AM > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 03:52 PM.

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