November 9th, 2011, 04:25 AM #1
I'm new to mac scripting and I was trying to add a network printer using the lpadmin command, I'm about 95% successful, however I have hitting a brick wall when it comes to authentication. here is the command
lpadmin -p 'PRINTERNAME' -U 'username: password' -v 'smb://SERVERPATH?waitjob=false' -P /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/Resources/Generic.ppd -o printer-is-shared=false -E
The reason I am not using smb://username: password@smb://SERVERPATH is because I need to escape the dreaded '@' sign if the user has it in his/her password.
Your help is much appreciated.