<html><body><p>Hi All,<br><br>  I have a significant amount of time on this and hoping some of you might have an idea.  I want to limit user bob from getting to a root prompt on this test box.  <br>It seems to work until bob is able to run a command he is allowed via sudo such as cat.  Sudo -i is on the deny command list in IPA and root is local(not in IPA) with<br>nsswitch pointing to files first then sss.<br><br>So logged on as user bob, first thing attempted was sudo -i which produces wrong pw message even though it is the correct pw but it is denying so fine.  Then I issue sudo cat /etc/sysconfig/iptables <br>and it allows it after I enter bob's pw which is fine.  However right after that I try sudo -i again and get root prompt which is not good.  I am thinking since root is local and files first then once I sudo up root is avail.<br>Any suggestions are welcome <br><br><br><br><b>[me@mine ~]$ ssh bob@server</b><br>bob@servers password: <br>Last login:  Time: from IP <br>Internal systems must only be used for conducting company business or for purposes authorized by company management<br>Use is subject to audit at any time by company management<br><b>[bob@server ~]$ sudo -i</b><br>[sudo] password for bob: <br>Sorry, try again.<br><b>[bob@server ~]$ sudo -i</b><br>[sudo] password for bob: <br>Sorry, try again.<br>[sudo] password for bob: <br>Sorry, try again.<br>[sudo] password for bob: <br>sudo: 2 incorrect password attempts<br><b>[bob@server ~]$ sudo cat /etc/sysconfig/iptables</b><br>[sudo] password for bob: <br># Firewall configuration written by system-config-firewall<br># Manual customization of this file is not recommended.<br>*filter<br><b>[bob@server ~]$ sudo -i</b><br><b>server.example.local:/root# cat /etc/sysconfig/iptables</b><br># Firewall configuration written by system-config-firewall<br># Manual customization of this file is not recommended.<br>*filter<br><br><br><br>  ipa sudorule-show bob<br>  Rule name: bob<br>  Description: test sudo rule for user bob<br>  Enabled: TRUE<br>  Host category: all<br>  Users: bob<br>  Sudo Allow Commands: /sbin/iptables, /sbin/service,  /bin/view,<br>                       /bin/bash, /bin/netstat, /usr/bin/sudo -u user -i, /bin/cat<br>  Sudo Deny Commands: /usr/bin/sudo -i, /usr/bin/sudo-i, /usr/bin/sudo -u root -i                      <br><br>Is it just me or is white space ignored as well with sudo commands much like the sudo options?<br><br><br><br><br><br><br>Sean Hogan<br>Security Engineer<br>Watson Security & Risk Assurance<br>Watson Cloud Technology and Support<br><font size="2" face="Verdana">email: schogan@us.ibm.com | Tel 919 486 1397</font><br><font size="2" face="Verdana"><br></font><img src="cid:1__=88BBF59CDFE464BE8f9e8a93df938690918c88B@" width="67" height="53" align="top"><font size="2" face="Verdana">  </font><img src="cid:2__=88BBF59CDFE464BE8f9e8a93df938690918c88B@" width="60" height="51" align="top"><br><br><br><BR>
</body></html>