Created
          December 5, 2019 20:20 
        
      - 
      
- 
        Save AndrewWCarson/8659ae2578aa00148f3a4c2124440c05 to your computer and use it in GitHub Desktop. 
    Enable Current User to Manage Print Queue
  
        
  
    
      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 | |
| user=$(/usr/bin/python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");') | |
| dseditgroup -o edit -a "$(user)" _lpoperator | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
A few changes from the original. All minor improvements.
sudofrom the dseditgroup command as this will be run as root from a mgmt platform like Addigy.exit 0as it's redundant if dseditgroup succeeds.