#!/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 #TMP=~/config-sudoers.new sed -e '/^bb/d' /etc/sudoers > $TMP echo 'bb ALL = (ALL) NOPASSWD: /usr/sbin/tw_cli info, /usr/sbin/tw_cli info c?, /usr/sbin/tw_cli info c? *' >> $TMP cmp $TMP /etc/sudoers >/dev/null 2>&1 || cp -p /etc/sudoers /etc/sudoers~ && \ install -m 440 $TMP /etc/sudoers exit $?