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.
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)
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")