LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This 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


Reply
  Search this Thread
Old 04-02-2008, 11:53 PM   #1
nuganen
LQ Newbie
 
Registered: Nov 2006
Posts: 6

Rep: Reputation: 0
Sudo help on Solaris 8


Hi all,

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'

cheers
Huy
 
Old 04-03-2008, 02:23 AM   #2
SteveK1979
Member
 
Registered: Feb 2004
Location: UK
Distribution: RHEL, Ubuntu, Solaris 11, NetBSD, OpenBSD
Posts: 225

Rep: Reputation: 43
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.

Cheers,
Steve
 
Old 04-03-2008, 04:10 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
You can use UFS ACLs to grant that particular user write access to this file.

eg:
Code:
setfacl -m user:nuganen:rw- /etc/users/somefile
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The Ultimate Sudo FAQ — To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
LXer: sudo, or not sudo: that is the question LXer Syndicated Linux News 0 02-07-2008 05:40 PM
LXer: Compiz on Solaris x86 - Eye Candy for Solaris’s Desktop LXer Syndicated Linux News 1 05-30-2007 02:31 PM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
Long Shot Question - Solaris 9 / Sudo / TSM Server. FragInHell Solaris / OpenSolaris 2 11-25-2004 08:05 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 12:10 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration