iptables –uid-owner , how to discover this ID?
by postcd from LinuxQuestions.org on (#4XS5Z)
Hello,
a general question. If iptables manual page (man iptables) shows -uid-owner parameter:
Quote:
How do i discover this UID?
I tried "id -u debian-tor", it shows an ID. I also tried third string/column from the "grep debian-tor /etc/group" output.
Which one is correct or if none, is there any command that returns the ID?
Or i am totally wrong and the parameter expect debian-tor instead of some number? (even if that is so, it may be interesting for some on how to discover ID behind the username)


a general question. If iptables manual page (man iptables) shows -uid-owner parameter:
Quote:
-uid-owner { USERNAME } : Matches if the packet was created by a process with the given effective USERNAME |
I tried "id -u debian-tor", it shows an ID. I also tried third string/column from the "grep debian-tor /etc/group" output.
Which one is correct or if none, is there any command that returns the ID?
Or i am totally wrong and the parameter expect debian-tor instead of some number? (even if that is so, it may be interesting for some on how to discover ID behind the username)