This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Dataprise — Tokenize adminrbc using current user's credentials (GUI prompt) | |
| # and the per-device adminrbc password (typed live in Live Terminal). | |
| current_user=$(stat -f%Su /dev/console) | |
| current_uid=$(id -u "$current_user" 2>/dev/null) | |
| if [ -z "$current_user" ] || [ "$current_user" = "root" ] || [ "$current_user" = "loginwindow" ]; then | |
| echo "✗ No user is logged in at the console. Aborting." | |
| exit 1 |