Article 4XS5Z iptables –uid-owner , how to discover this ID?

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:
-uid-owner { USERNAME } : Matches if the packet was created by a process with the given effective USERNAME
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)latest?d=yIl2AUoC8zA latest?i=Ub4gVDeCRHg:NK6E1yVxV3I:F7zBnMy latest?i=Ub4gVDeCRHg:NK6E1yVxV3I:V_sGLiP latest?d=qj6IDK7rITs latest?i=Ub4gVDeCRHg:NK6E1yVxV3I:gIN9vFwUb4gVDeCRHg
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments