MaxUID - command /bin/awk -F':' '{ if($3 > max) max = $3 } END { print max }' /etc/passwd

This module provides the MaxUID value gathered from the /etc/passwd file.

class insights.parsers.max_uid.MaxUID(context)[source]

Bases: Parser

Class for parsing the MaxUID value from the /etc/passwd file returned by the command:

/bin/awk -F':' '{ if($3 > max) max = $3 } END { print max }' /etc/passwd

Typical output of the /etc/passwd file is:

root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
nobody:x:65534:65534:Kernel Overflow User:/:/sbin/nologin

Typical output of this parser is:

65534
Raises

Examples

>>> max_uid.value
65534
parse_content(content)[source]

This method must be implemented by classes based on this class.