Log off specific users
Revision as of 10:35, 6 March 2017 by Michael.mast (talk | contribs) (Created page with "<pre> for user in user1 user2 user3 ; do id=$(query user $user 2>> /dev/null | awk '{ print $3 }' | sed -e '/ID/ d') if [[ "$id" =~ ^[1-9][0-9]?$ ]]; then logoff $id echo date...")
for user in user1 user2 user3 ; do id=$(query user $user 2>> /dev/null | awk '{ print $3 }' | sed -e '/ID/ d') if [[ "$id" =~ ^[1-9][0-9]?$ ]]; then logoff $id echo date "$user was logged off" >> logg_off.log fi done