Sponsored Content
Operating Systems Solaris Can't sudo Using Group Permission Post 302486851 by rjlohman on Monday 10th of January 2011 12:35:00 PM
Old 01-10-2011
Can't sudo Using Group Permission

All:

I'm having a problem with sudo on Solaris 5.10 that is giving me fits (and BTW, I'm a Linux admin by trade...).

The issue is that I have a number of users (myself included) that cannot sudo to root to complete user admin tasks. Assuming the user is jdoe, and the group with the elevated permissions is called useradmins, here is what the configurations look like (sorry - had to change the details due to confidentiality stuff...):

/etc/passwd entry:
jdoe:x:26199:26199::/home/jdoe:/usr/bin/bash

/etc/group entries:
useradmins::15:user1,user2,user3,user4,user5,user6,user7
useradmins::15:user8,user9,jdoe,user10
jdoe::26199:

Relevant section of /usr/local/etc/sudoers
# All unix users in the sysadmin group get to run what eveah
%useradmins ALL=(ALL) ALL

And some command line fun and games:
[root@solbox ~]# id jdoe
uid=26199(jdoe) gid=26199(jdoe)
[root@solbox ~]# groups jdoe
jdoe useradmins

Some things of interest...

> Yes, there are two useradmins groups, both with the same gid. I found some postings from the Google that reference a line-length limit, and that some people have overcome this by creating a second entry for the group. We're at roughly 260 chars on the first line of the file, so I'm not sure why there are two entries.
> I suspect the issue surrounds the id and groups commands. groups shows me as a member of my own personal group, as well as a member of the useradmins group. id, on the other hand shows no useradmins membership.
> When I tried a truss -f id jdoe, I don't see anything in the output that leads me to see anything returning an error code. There are numerous door_info and door_call calls which are a complete enigma to me, but each returns a 0 (presumably, success?)

Any help is appreciated.
 

10 More Discussions You Might Find Interesting

1. Solaris

entry in /etc/group too long - problem using sudo with %group

hi folks, I've been googling for quite some time, but still can't find anything near it...my problem is the following: for useradministration in our company we are using ssh/sudo, now whenever I try to add users (we have quite a number of users) with useradd -G groupname for secondary group I... (4 Replies)
Discussion started by: poli
4 Replies

2. UNIX for Dummies Questions & Answers

group permission

I have an executable that had permissions set to 700. I changed this to 770 and added a user to the group in an attempt to allow that userds to run the file. Obviously this didnt work or I wouldnt be here. Do I need to cause the group file to be re-read and if so how, or am I misunderstanding... (6 Replies)
Discussion started by: thumper
6 Replies

3. UNIX for Dummies Questions & Answers

Sudo permission issue

folks; How can i give a group a sudo permission to execute only some command "like start/stop Apache", so every user in that group can sudo to use this as himself, i mean when he tries to sudo, he will be asked for a password (and make it so he must use his own NT password not a generic one) then... (6 Replies)
Discussion started by: Katkota
6 Replies

4. Shell Programming and Scripting

Find all files with group read OR group write OR user write permission

I need to find all the files that have group Read or Write permission or files that have user write permission. This is what I have so far: find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}' It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies

5. Solaris

sudo permission

HI friends can i know how to assign sudo permission to normal user in solaris, and if not i want to assign few commands like format,user creation to normal user, i want to share few permission to normal user towork like a root in $ prompt. (2 Replies)
Discussion started by: kurva
2 Replies

6. Solaris

sudo for permission kill -HUP

Hi, I'm trying to provide "/usr/bin/kill -HUP" command to one of the user using sudo file. I have configured sudo as following: $cat /etc/sudoers User_Alias AA=conadmin Cmnd_Alias KILL1=/usr/bin/kill -HUPAA ALL=NOPASSWD:KILL1 When I login as the user and execute 'sudo -l' command, it... (2 Replies)
Discussion started by: mohzub
2 Replies

7. UNIX for Dummies Questions & Answers

grant sudo permission

Hi all, I have to grant sudo permission to a user. I have searched online and find that /etc/sudoers file needs to be changed with visudo command. As i am new to linux, this is not clear to me. Can anybody take an example and show me how exactly this done. Thanks in advance! (2 Replies)
Discussion started by: lramsb4u
2 Replies

8. Solaris

Sudo Privileges & Sudoers Group

I'm looking for some suggestions to accomplish what a specific user needs, without adding them to the "sudoers" group. I have X user, that is requesting to be able to change file permissions on items owned by others and search directories where X user doesn't have access. I'm open to any... (2 Replies)
Discussion started by: Nvizn
2 Replies

9. Solaris

Adding user with Sudo permission in solaris 9

How can I add user with Sudo permission in solaris 9 ? I'm new in Solaris (2 Replies)
Discussion started by: ahmednoaman
2 Replies

10. SuSE

How to add a new user to sudo group in openSuse 12.3?

Hi All, I have created a openSUSE 12.3 VM in my VirtualBox. I have created one user and added that user to my group. Is there any command by which I can add that user to sudoers user group like we do in ubuntu? #sudo adduser user1 sudo I checked the /etc/groups file, but there is no sudo... (1 Reply)
Discussion started by: sanzee007
1 Replies
dscacheutil(1)						    BSD General Commands Manual 					    dscacheutil(1)

NAME
dscacheutil -- gather information, statistics and initiate queries to the Directory Service cache. SYNOPSIS
dscacheutil -h dscacheutil -q category [-a key value] dscacheutil -cachedump [-buckets] [-entries [category]] dscacheutil -configuration dscacheutil -flushcache dscacheutil -statistics DESCRIPTION
dscacheutil does various operations against the Directory Service cache including gathering statistics, initiating lookups, inspection, cache flush, etc. This tool replaces most of the functionality of the lookupd tool previously available in the OS. FLAGS
A list of flags and their descriptions: -h Lists the options for calling dscacheutil -q category Initiate a query using standard calls. These calls will either return results from the cache or go fetch live data and place them in the cache. By default if no specific query is requested via -a then all results within that category will be returned. -a key value Optional flag to -q for a specific key with a value. -cachedump Dumps an overview of the cache by default. Additional flags will provide more detailed information. -buckets Used in conjunction with -cachedump to also print hash bucket usage of the current cache. -entries [category] Used in conjunction with -cachedump to dump detailed information about cache entries. An optional category can be supplied to only see types of interest. Dumping 'host' entries can only be done by administrative users. -configuration Prints current configuration information, such as the search policy from Directory Service and cache parameters. -flushcache Flushes the entire cache. This should only be used in extreme cases. Validation information is used within the cache along with other techniques to ensure the OS has valid information available to it. -statistics Prints statistics from the cache including an overview and detailed call statistics. Some calls are not cached but are derived from other calls internally. Cache hits and cache misses may not always be equal to external calls. For example getaddrinfo is actually a combination of gethostbyname with other calls internally to the cache to maximize cache hit rate. Available categories and associated keys: group name or gid host name or ip_address (used for both IPv6 and IPv4) mount name protocol name or number rpc name or number service name or port user name or uid EXAMPLES
Lookup a user: % dscacheutil -q user -a name jdoe name: jdoe password: ******** uid: 501 gid: 501 dir: /Users/jdoe shell: /bin/csh gecos: John Doe Lookup all users: % dscacheutil -q user Dump cache overview: % dscacheutil -cachedump Dump cache details with user entries: % dscacheutil -cachedump -entries user SEE ALSO
DirectoryService(8), dsmemberutil(1) Darwin Jan 14, 2007 Darwin
All times are GMT -4. The time now is 07:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy