New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add stderr redirect to stdout on adduser #2

Merged
merged 1 commit into from Aug 18, 2015

Conversation

Projects
None yet
2 participants
@petiepooo
Contributor

petiepooo commented Aug 18, 2015

When SecurityOnion is installed, but not yet configured, on a base Ubuntu 12.04.5 server install, it creates the watchdog cron.d entry which is called every five minutes. However, the sguil user has not yet been created, so nsm_sensor_ps-restart calls adduser with an invalid username, and the error is sent to stderr, which generates an email to the default user every five minutes.
By redirecting stderr to stdout (before redirecting stdout to /dev/null), when adduser is called before sosetup is run (sguil user does not yet exist), the adduser error shows up in /var/log/nsm/watchdog.log rather than being mailed to root.

add stderr redirect to stdout on adduser
When SecurityOnion is installed, but not yet configured, on a base Ubuntu 12.04.5 server install, it creates the watchdog cron.d entry which is called every five minutes.  However, the sguil user has not yet been created, so nsm_sensor_ps-restart calls adduser with an invalid username, and the error is sent to stderr, which generates an email to the default user every five minutes.
By redirecting stderr to stdout (before redirecting stdout to /dev/null), when adduser is called before sosetup is run (sguil user does not yet exist), the adduser error shows up in /var/log/nsm/watchdog.log rather than being mailed to root.

dougburks added a commit that referenced this pull request Aug 18, 2015

Merge pull request #2 from petiepooo/patch-1
add stderr redirect to stdout on adduser

@dougburks dougburks merged commit 67087c9 into Security-Onion-Solutions:master Aug 18, 2015

@petiepooo petiepooo deleted the petiepooo:patch-1 branch Aug 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment