Skip to main content
Question

erase-install credentials wrong keyboard layout?

  • November 20, 2025
  • 4 replies
  • 44 views

Forum|alt.badge.img+4

Hi,

we are using the erase-install tool from github to upgrade our Macs (I guess the Jamf mass action feature is still not working proper?) and facing the issue, that the pop up to enter the local mac user credentials are in another keyboard layout than the system has. 

I could not find anything on github or here where this was discussed. Any ideas? 

 

Thanks already

4 replies

_Daley
Forum|alt.badge.img+6
  • Contributor
  • November 20, 2025

If you run the script as a Root user, it will use the keyboard layout of that user. This might be what is happening in this instance.

 

You can get around it with using sudo -u as the currently logged-in user. Hope that helps!


Forum|alt.badge.img+4
  • Author
  • Contributor
  • November 20, 2025

I found this, but not sure how I can fix it?! https://github.com/grahampugh/erase-install/issues/563


Forum|alt.badge.img+4
  • Author
  • Contributor
  • November 20, 2025

If you run the script as a Root user, it will use the keyboard layout of that user. This might be what is happening in this instance.

 

You can get around it with using sudo -u as the currently logged-in user. Hope that helps!

I have a policy that includes the erase-install.pkg and a script erase-install-launcher with Parameter Values. I am not a super duper mac-admin yet, maybe you can help me where I can check this what you wrote?

Thanks a lot!


_Daley
Forum|alt.badge.img+6
  • Contributor
  • November 21, 2025

If you run the script as a Root user, it will use the keyboard layout of that user. This might be what is happening in this instance.

 

You can get around it with using sudo -u as the currently logged-in user. Hope that helps!

I have a policy that includes the erase-install.pkg and a script erase-install-launcher with Parameter Values. I am not a super duper mac-admin yet, maybe you can help me where I can check this what you wrote?

Thanks a lot!

No worries! When you run a script within a policy, it will always execute that script as the “Root” user. The Root user has all the privileges to do whatever he wants on the users' system. But in this case we want to assume control of the logged-in user instead. 

 

You can fetch the current user with something like this: 

LoggedInUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ { print $3 }' )

Then run the command as that user by using the variable: 

sudo -u "$LoggedInUser"