Hello, long time lurker here. We are setting up a secure print service and part of the setup is to have your username before the print server/queue. I have uploaded the driver package, attached my PPD of my printer configuration and set up the printer in JSS, and created a self service policy that distributes the drivers and printer config. Everything works super flawless except getting the current users login added to the lpd url as seen below.
Device URl
lpd://$USERNAME@myservername.mycompany.com/SecurePrint_MAC_Queue
The #USERNAME stays in /etc/cups/printer.conf same as above. I need my actual username to replace it as you can gather.
If its not supported this way then perhaps I can use a script, one script I have tested is this:
sudo launchctl stop org.cups.cupsd
loggedInUser=$( ls -l /dev/console | awk '{ print $3 }' ) | sed -ie "s|$USERNAME|${loggedInUser}|g" /etc/cups/printers.conf
sudo launchctl start org.cups.cupsd
now it does reportedly stop cups and restart as well as replace the username in the printer.conf with mine however its still pushing to the print server queue as $USERNAME as well as after a reboot its back to $USERNAME
we are using Uniflow for the security aspect and cannon as the printer. Uniflow apparently handles their secure printing in a different manner so that selecting the check box for secure printing does not work hence the custom url.
Any suggestions would be greatly appreciated as I would like to avoid manual configuration.