Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

add stderr redirect to stdout on adduser #2

Merged
merged 1 commit into from
Aug 18, 2015
Merged

add stderr redirect to stdout on adduser #2

merged 1 commit into from
Aug 18, 2015

Conversation

petiepooo
Copy link
Contributor

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.

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
add stderr redirect to stdout on adduser
@dougburks dougburks merged commit 67087c9 into Security-Onion-Solutions:master Aug 18, 2015
@petiepooo petiepooo deleted the patch-1 branch August 24, 2015 18:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants