-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathUser.regex.txt
15 lines (14 loc) · 912 Bytes
/
User.regex.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Matches a User (described in /etc/passwd)
(?m)^(?<Username>[^:]+) # The Username is
\: # followed by a colon.
(?<EncryptedPassword>[^:]+) # The encrypted password is
\: # followed by another colon.
(?<UserID>\d+) # The user ID is a series of digits
\: # followed by another colon
(?<UserGroupID>\d+)? # The user group ID is a series of digits
\: # followed by yet another colon
(?<FullUsername>[^:]*?) # The full username is anything until the next colon (and could be nothing)
\: # Then another colon
(?<UserHomeDirectory>[^:]*?) # The home directory is anything until the next colon (and could be nothing)
\: # Then one last colon
(?<LoginShell>.*$) # Anything until the end of the line is the login shell