Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to change a printer's IP address in OSX (Lion) without having to add a new printer? I did find Printer IP Remedy, but was curious if there was an 'official' method.

share|improve this question
Tried Printer IP Remedy on 10.7.4 and it all it seem to do was to remove my print queue – Ian Oakes Aug 19 '12 at 2:15

1 Answer

up vote 2 down vote accepted

The configuration information is stored in a system file in /etc/cups/printers.conf. You could edit the file and just change the IP address, but you can easily run into permission problems and end up screaming with frustration.

Here are several options that should work; most require using the terminal command line.

  • Pick your text editor of choice, launch it with administrator privileges, and edit the file directly.
    Example: using terminal, type: sudo vi /etc/cups/printers.conf
    (sudo will launch vi with adminstrator privileges; which will require that you enter your password.)

  • Use sed to modify the file from the command line; here are some examples:

    • sed command line to change IP from 10.1.1.21 to 192.168.1.47, creating a new file:
      sudo sed -i.bak s/10\.1\.1\.21/192\.168\.1\.47/g printers.conf
      To verify the changes, type:
      sudo diff printers.conf printers.conf.bak
    • sed command to change all IPs from 10.1.1.x to 192.168.1.x (leaving final segments unchanged); this will backup the file to printers.conf.bak:
      sudo sed -i.bak s/10\.1\.1\./192\.168\.1\./g printers.conf

Hope that helps.

share|improve this answer
1  
/me performs a facepalm ... apple ... – akira Oct 19 '12 at 17:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.