Unix\Linux - search for duplicate UIDs

(imported topic written by SystemAdmin)

I just started writing fixlets for Unix\Linux platforms, so I’m still trying to adapt to using the Unix\Linux inspectors as opposed to the Windows inspectors - anyway, I was wondering if anyone knew of a good way to search Unix\Linux accounts for duplicate UIDs.

(imported comment written by SystemAdmin)

I just put this together (not sure if it’s correct or not - any help testing it is most welcome).

exists lines whose ( it does not contain “root” ) of file “/etc/shadow” AND ((preceding text of first “:” of following texts of first “:” of following texts of first “:” of following texts of first “:” of lines whose (it does not contain “root”) of file “/etc/shadow”) as integer = 0)

(imported comment written by SystemAdmin)

I guess I should add that the above relevance isn’t returning anything… yet. So I take that as as a positive (for now…).

(imported comment written by mgoer)

Just created a relevance check to check if there is any double UID in the /etc/passwd file:

exists unique values whose (multiplicity of it >= 2) of (preceding texts of firsts ":" of following texts of firsts ":" of following texts of firsts ":"of lines of file "/etc/passwd")