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

Manage Accounts scripts issue #36

Open
cashxx opened this issue Jan 26, 2022 · 2 comments
Open

Manage Accounts scripts issue #36

cashxx opened this issue Jan 26, 2022 · 2 comments

Comments

@cashxx
Copy link

cashxx commented Jan 26, 2022

In the Manage Accounts scripts, the line that creates the password from serial is a small problem as it adds padding at the end with == for the password and if you have in the policy or configuration profile to now allow simple passwords it won't let you login as local admin because of the == at the end.

p=system_profiler SPHardwareDataType | awk '/Serial/ {print $4}' | tr '[A-Z]' '[K-WA-C]' | tr 3-6 4-90-3 | base64

Any idea on how to stop the padding or if it happens strip it so only the serial number of the computer is converted?

@MaxXyzzy
Copy link

MaxXyzzy commented Jan 29, 2022

You can add | sed 's/=//g' to the end of that line to remove the padding:

p=`system_profiler SPHardwareDataType | awk '/Serial/ {print $4}' | tr '[A-Z]' '[K-ZA-J]' | tr 0-9 4-90-3 | base64 | sed 's/=//g'`

@cashxx
Copy link
Author

cashxx commented Jan 29, 2022

Ahh forgot about sed. Thanks, didn't think of that, will make note of that and try it. Should be added to script as not allow simple passwords I would think would be common setting people set. I also noticed that the password is spread all through logs. Not sure that is a good thing. This isn't the safest setup, but something and better than having the same password on everything. Thank you!

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

2 participants