Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- while read username group name surname; do
- if [ -z $group ]; then
- username_=$( echo $username | cut -d ',' -f1 )
- group=$( echo $username | cut -d ',' -f2 )
- username=$username_
- else
- username=$( echo $username | tr -d ':' )
- fi
- #echo $username
- #echo $group
- #echo $name
- #echo $surname
- # delete users
- deluser --remove-home --quiet $username &> abc
- delgroup --only-if-empty --quiet $group &> abc
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement