Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 May 2000 17:43:15 +0200
From:      Willem Brown <willem@brwn.org>
To:        "Louis C.T.Chau" <louischau@hotmail.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: How to control the user to access different software
Message-ID:  <3926B293.3AC8F69F@brwn.org>
References:  <20000520144230.45917.qmail@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

	You can do it with groups, I think. Create a group called "vi" for
example and add all the users you want to allow access to vi to this
group.
Remember to add any system users that might use it to this group like
"root"
and "daenmon" etc.

man 5 group

Example.

vi:*:1002:willem,root,daemon

Just change the group id to be an appropriate value for you system, see
the
man page.

Then change the group permissions for /usr/bin/vi to the group called vi
and remove the other permissions from /usr/bin/vi

man 1 chmod
man 1 chgrp

denary# ls -al /usr/bin/vi
-r-xr-xr-x  6 root  wheel  278168 Mar 20 23:31 /usr/bin/vi
denary#  

denary# chgrp vi /usr/bin/vi
denary# chmod o= /usr/bin/vi

denary# ls -al /usr/bin/vi
-r-xr-x---  6 root  vi  278168 Mar 20 23:31 /usr/bin/vi
denary#  

Log out and back in and only the users that are part of the "vi" group
should be
able to execute it. I'm not to sure what this will break
though.


"Louis C.T.Chau" wrote:
> 
> Dear,
> 
> I have a problem that is I don't how to configure my freebsd server which
> can control different users can access different softwares.  E.g. I want to
> control some users can use to vi editor and others are not.  How to
> configure it? Pls help.
> 
> regards,
> 
> Louis.
> 
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

-- 
|--------------LINUX & *BSD, the CHOICE is yours--------------|


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3926B293.3AC8F69F>