Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am a member of the root group on two different computers. On one computer I can do almost anything while I can't do these same things on the other.

Example: iptables --list which is owned by root:root on both.

mike628@NASBD122F:/sbin$ iptables --list
-bash: iptables: command not found
mike628@NASBD122F:/sbin$ groups mike628
mike628 : mike628 root mysql

What am I missing?

share|improve this question
add comment

1 Answer

It seems that you don't have /sbin/ in your PATH. Fix you PATH or run iptables with full pathname as /sbin/iptables.

share|improve this answer
    
mike628@NASBD122F:/sbin$ /sbin/iptables --list iptables v1.4.8: can't initialize iptables table filter': Permission denied (you must be root) Perhaps iptables or your kernel needs to be upgraded. mike628@NASBD122F:/sbin$ iptables v1.4.8: can't initialize iptables table filter': Permission denied (you must be root) –  mike628 Jun 17 '11 at 13:27
    
Well, you must be root to run iptables. If you really can run iptables on other computer with non-root user then you should check what permissions iptables binary has (ls -l /sbin/iptables) - probably you have iptables binary with suid flag on. –  AlexD Jun 17 '11 at 14:25
    
Does This help, there is a symlink......root@NASBD122F:/sbin# ls -l /sbin/iptables lrwxrwxrwx 1 root root 14 Jun 12 17:34 /sbin/iptables -> iptables-multi root@NASBD122F:/sbin# ls -l /sbin/iptables-multi -rwxr-xr-x 1 root root 49248 Jul 16 2010 /sbin/iptables-multi –  mike628 Jun 17 '11 at 14:54
    
mike628@NASBD122F:/etc$ id uid=1000(mike628) gid=1000(mike628) groups=1000(mike628),0(root),121(mysql) –  mike628 Jun 17 '11 at 15:35
    
Is this output from computer where iptables is failing (NASBD122F)? Could you provide same from computer where iptables is working? Also, check output of which iptables for user mike628 on both computers. –  AlexD Jun 17 '11 at 16:57
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.