Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

downgradeUsertoStandard doesn’t use a variable for admin account #140

Open
ajh0912 opened this issue Jun 18, 2024 · 0 comments
Open

downgradeUsertoStandard doesn’t use a variable for admin account #140

ajh0912 opened this issue Jun 18, 2024 · 0 comments

Comments

@ajh0912
Copy link

ajh0912 commented Jun 18, 2024

The comment here implies there is an adminaccountname variable.

## This script can set all existing Admin accounts to be standard user accounts. The account specified in adminaccountname will not be downgraded if it is found

But L83 is hard coded to the string ‘admin’.

if [[ $downgrade = true ]]; then
while read useraccount; do
if [[ "$useraccount" == "admin" ]]; then
echo "Leaving admin account as Admin"
else
echo "Making $useraccount a normal user"
#/usr/sbin/dseditgroup -o edit -d $useraccount -t user admin
fi
done < <(dscl . list /Users UniqueID | awk '$2 >= 501 {print $1}')
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant