How do I add everyone to the lpadmin group on a mac via a script.
How do I add everyone to the lpadmin group on a mac via a script. I found the following command but it requires a password after it has run. Is there any way to automate this?
dseditgroup -o edit -u itadmin -p -a everyone -t group _lpadmin
dseditgroup -o edit -u itadmin -p -a everyone -t group _lpadmin
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
ms01ak
12 years ago
Posted by:
samuelcolt
12 years ago
Use Online Shell Script
Add Machines to the list.
Choose MAC OS X versions from the supported OS list.
Enable "Run As User:" and enter a local administrator credentials
Paste the following into "Script Text"
sudo dseditgroup -o edit -t group -a everyone _lpadmin
Then hit "Run Now".
Tested and Works!
Comments:
-
Once I choose the Mac OSX versions it will not allow Run As User. This message pops up in that area:
Run As options are only available for Online KScripts and Online Shell Scripts for Windows. - WGM_Jeff 12 years ago -
Yes... i am using Online Shell Script and using "Run As" with admin credentials.
I also have the following in the "script text" box and it works great.
sudo dseditgroup -o edit -t group -a everyone _lpadmin - samuelcolt 12 years ago
Posted by:
ms01ak
12 years ago
Try running it an shell script, with the sudo command in front.
Comments:
-
I tried that and this is the output I got back.
Running: /Library/Application Support/Dell/KACE/data/scripts/484/script.sh 2>&1
Please enter user password:
Failed to set credentials. - WGM_Jeff 12 years ago