Koozali.org: home of the SME Server

[solved] printer name with "_" (underscore)

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
[solved] printer name with "_" (underscore)
« on: January 08, 2012, 07:27:33 PM »
I need to create a printer called "imp_nf" for an old legacy system who just see printer with this EXACT name.
When I try to create it on SME it say I cannot use the underscore.

There are any way to workaroud this restriction easily??
BTW: Why there are this limitation ?



If it matters, is a SO old system, It just run over Win98 + MS Access97 (no new version allowed at all!)
« Last Edit: January 12, 2012, 09:46:29 AM by jader »
...

Offline mmccarn

  • *
  • 2,653
  • +10/-0
Re: printer name with "_" (underscore)
« Reply #1 on: January 09, 2012, 02:39:17 PM »
You might be able to do what you need to do like this:

Method A - manual account db update
1) create the printer however you can (named impnf, for example).  Be sure not to use any spaces in any of the available fields or the 'db accounts set imp_nf...' command shown below will do odd things...
2) note the output of db accounts show impnf
3) create the printer you want using
Code: [Select]
db accounts set imp_nf `db accounts get impnf | sed s/\|/\ /g`
signal-event printer-create imp_nf

Method B - using a custom template fragment
1) Create the printer however you can (named impnf, for example)
2) open /etc/samba/smb.conf and locate the configuration directives related to 'impnf'
3) create a custom template fragment in /etc/e-smith/templates-custom/etc/smb.conf named "50customprinter", containing the same data collected in step 2, but with the printer name set to "imp_nf"
4) execute signal-event workgroup-update (this event updates /etc/samba/smb.conf and restarts smbd).

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: printer name with "_" (underscore)
« Reply #2 on: January 12, 2012, 09:46:00 AM »
I've used method A with success.
Thank you.
...