#!/bin/bash
# Add the appropriate line to allow tw_cli use by big brother:

TMP=/tmp/config-sudoers.$$
trap "rm $TMP* 2>/dev/null" EXIT

sed -e '/^bb/d' -e '$ a \
bb      ALL = (ALL) NOPASSWD: /usr/sbin/tw_cli info, /usr/sbin/tw_cli info c?
' /etc/sudoers >> $TMP && cp -p /etc/sudoers /etc/sudoers~ && \
mv $TMP /etc/sudoers

exit $?