Find successful and failed logins in a vsftpd log
Build a paste-ready command, then review its compatibility and effects before running it.
grep -Ei 'OK LOGIN|FAIL LOGIN' /var/log/vsftpd.logread-onlyrequires privileges Compatibility
LinuxVerified for Linux using posix, bash, zsh syntax.
Operational knowledgereview due 2027-01-19
Requirementsgrepgrep must be installed and available on PATH.Elevated accessReview the exact scope before using an elevated account.
Version supportgrep Current supported releasesVerified for linux using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalsWed Jul 23 09:51:21 2026 [pid 3192] [alice] OK LOGIN: Client "203.0.113.42"Representative successful output; values vary with the selected target and system state.
Known errorsgrep: command not foundgrep is missing or is not available on PATH.Permission deniedThe current identity does not have the required access.
Verifygrep -Ei 'OK LOGIN|FAIL LOGIN' {{logFile}}The output matches the expected target and exits without an error.Rollback noteNo universal automatic rollback is available. Capture the current state and use the tool-specific recovery procedure before applying changes.
Command breakdown
01grepCommandRuns the grep stage of this one-liner.
02-EiOptionUses extended regular expressions and matches without letter-case sensitivity.
03'OK LOGIN|FAIL LOGIN'ArgumentPasses 'OK LOGIN|FAIL LOGIN' to grep.
04<vsftpd-log-file>ParameterA value supplied in the Fill parameters section.
Example input
grep -Ei 'OK LOGIN|FAIL LOGIN' /var/log/vsftpd.log
Example output
Wed Jul 23 09:51:21 2026 [pid 3192] [alice] OK LOGIN: Client "203.0.113.42"
Wed Jul 23 09:54:08 2026 [pid 3260] [backup] FAIL LOGIN: Client "198.51.100.88"
Illustrative output — exact values vary by system and data.
Official sources
Related commands