Yes Dmitri, this is the user I'm doing the tests with on that client.  Though I 
would expect this user to have sudo capabilities on this host he does not.  I 
first came across the idea that maybe domainname/nisdomainname/dnsdomainname 
did not match and that was causing the problem.  I have since fixed all of 
those to match my system domain which is the same domain that the client was 
enrolled with and it did not change any of the sudo behaviors for this user.  I 
currently have no specific HBAC rule configured besides the "wide open" rule.  
Do I need one more specific for allowing users to run sudo?

-----Original Message-----
From: Dmitri Pal [] 
Sent: Wednesday, October 17, 2012 2:57 PM
To: Macklin, Jason {DASB~Branford}
Subject: Re: [Freeipa-users] Sudo works for full access, but not on a per 
command or host level.

On 10/17/2012 01:05 PM, Macklin, Jason wrote:
> Thanks guys!  Adding the "-b" did make a world of difference though it still 
> doesn't make anything too obvious... at least to me.
> [jmacklin@dbduwdu062 Desktop]$ ldapsearch -Y GSSAPI -H 
> ldap:// -b "ou=SUDOers,dc=dbr,dc=roche,dc=com"
> SASL/GSSAPI authentication started
> SASL username:
> SASL SSF: 56
> SASL data security layer installed.
> # extended LDIF
> #
> # LDAPv3
> # base <ou=SUDOers,dc=dbr,dc=roche,dc=com> with scope subtree # 
> filter: (objectclass=*) # requesting: ALL #
> # sudoers,
> dn: ou=sudoers,dc=dbr,dc=roche,dc=com
> objectClass: extensibleObject
> ou: sudoers
> # test4, sudoers,
> dn: cn=test4,ou=sudoers,dc=dbr,dc=roche,dc=com
> objectClass: sudoRole
> sudoUser: asteinfeld
> sudoHost:
> sudoHost: +tempsudo
> sudoCommand: ALL
> cn: test4

This means that user "asteinfeld" should be allowed to execute any command on 
host "" or any host that is a member of the "tempsudo" 
host group.
Is this the user you making tests with?

Keep in mind the other general per-requisits: If you use netgroups the domain 
should be correct and the netgroups should be configured.
Also HBAC should allow this user to authenticate via sudo on this host.
AFAIR your HBAC is now wide open but when you start changing things to narrow 
access you need to make HBAC rules for SUDO too. 
> # switch, sudoers,
> dn: cn=switch,ou=sudoers,dc=dbr,dc=roche,dc=com
> objectClass: sudoRole
> sudoUser: oyilmaz
> sudoHost:
> sudoCommand: /bin/su
> cn: switch

This rule allows "oyilmaz" to execute one command "/bin/su" on host 
> # jing144, sudoers,
> dn: cn=jing144,ou=sudoers,dc=dbr,dc=roche,dc=com
> objectClass: sudoRole
> sudoUser: jli
> sudoHost:
> sudoCommand: ALL
> cn: jing144

I hope you can now deduce the meaning of this one :-)

> # Admin, sudoers,
> dn: cn=Admin,ou=sudoers,dc=dbr,dc=roche,dc=com
> objectClass: sudoRole
> sudoUser: jmacklin
> sudoUser: mrini
> sudoUser: cgajare
> sudoUser: parnold
> sudoUser: hhebert
> sudoUser: ckuecherer
> sudoUser: gferreri
> sudoHost: ALL
> sudoCommand: ALL
> cn: Admin

given users ALL commands on any host.

> # search result
> search: 4
> result: 0 Success
> # numResponses: 6
> # numEntries: 5
> I really appreciate all of the help!
> Cheers,
> Jason

So with this knowledge can you try different combinations of users and hosts 
and provide the results?
You might want to remove the Admin for now to get it out of picture.

Thank you,
Dmitri Pal

Sr. Engineering Manager for IdM portfolio Red Hat Inc.

Looking to carve out IT costs?

Freeipa-users mailing list

Reply via email to