Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a SPARC server with solaris 8 installed on it
recently i installed Sudo package for it and configured it so that it will limits users to what they can do
below is the config for sudoers file
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
User_Alias MAINTAINERS = chris
# Cmnd alias specification
Cmnd_Alias DEB = /usr/sbin/passwd, /usr/bin/useradd, /usr/local/MAINT/test.ksh
#
# User privilege specification
root ALL=(ALL) ALL
MAINTAINERS ALL = DEB
I was wonder there's a file that i need to edit by using 'vi' but as a normal user i only have read access to it where and what do i need to add in the 'sudoers' file in order to edit that file for e.g that file is located in '/etc/users'
Distribution: RHEL, Ubuntu, Solaris 11, NetBSD, OpenBSD
Posts: 225
Rep:
Hi,
I don't believe this is really possible with sudo. Sudo will give you the ability to run commands, but as far as I know, you can't be that restrictive about what those commands can be used to do. e.g. you could give the user the ability to run vi as root, but then they can edit any file as root, spawn a shell as root etc. I'm guessing you've already worked that out too.
Personally if there's just one file and I need some specific users to have permission to edit it, then I would just use standard UNIX filesystem permissions and groups to do that. e.g. create a group called 'maint', make the file readable and writeable by that group and then add the users I wanted to be able to edit the file to the group.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.