fix: further changes
This commit is contained in:
parent
fbbb675425
commit
882f9aa78e
1 changed files with 4 additions and 0 deletions
|
@ -27,6 +27,7 @@ iter_dirs(){
|
|||
if [ "$username" != "$username_lower" ]; then
|
||||
mv "$root/$username" "$root/$username_lower"
|
||||
echo "Changed $username to $username_lower"
|
||||
dir="$root/$username_lower"
|
||||
username=$username_lower
|
||||
fi
|
||||
|
||||
|
@ -34,6 +35,7 @@ iter_dirs(){
|
|||
if [[ $username =~ ^[0-9] ]]; then
|
||||
mv "$root/$username" "$root/_$username"
|
||||
echo "Changed $username to _$username"
|
||||
dir="$root/_$username"
|
||||
username="_$username"
|
||||
fi
|
||||
|
||||
|
@ -45,6 +47,8 @@ iter_dirs(){
|
|||
if id "$username" &>/dev/null; then
|
||||
change_owner_and_permissions "$dir" "$username"
|
||||
echo "Changed owner and permissions of $dir to $username"
|
||||
# else
|
||||
# echo "User $username not found. Leaving $dir owned by root."
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue