[Samba] How do I get a literal '%' in smb.conf

Joris De Pooter joris.de.pooter at atempo.com
Wed Jun 8 16:11:29 GMT 2005

Michael J. Wetmore a écrit :
>  %prt -> rt (%p expands to nothing because whatever it is supposed to go to is empty on this system)
>  %%prt -> %%prt (extra % must suppress expansion)
>  %%pprt -> %%pprt (see above - if expansion was not suppressed this should work in my case, with %p empty)
> Conclusions:
> (1)It looks like %% is supposed to work, expansion is supressed but one of the '%' should be dropped.
> (2)Version 2.2.0 of samba does not allow a symlink in a path statement of a share - earlier versions did.
> If (1) is a bug, has it been fixed in later versions?
> -----Original Message-----
> From: Jörn Nettingsmeier [mailto:pol-admin at uni-duisburg.de] 
> Sent: Wednesday, June 08, 2005 10:28 AM
> To: Michael J. Wetmore
> Cc: samba at lists.samba.org
> Subject: Re: [Samba] How do I get a literal '%' in smb.conf
> Michael J. Wetmore wrote:
>>I have tried 'path = /FIX010/%%prt' and 'path = /FIX010/\%prt' and 
>>also including a file with the path statement.  That %p keeps getting 
>>expanded.  (%p is empty).
> hmm. *if* samba uses the same semantics as c format strings, then "%%" 
> should yield a single per-cent sign. but i can't test atm, and you might want to try it yourself on a test box before hosing your production system....
> regards,
> jörn

With a Samba 3.0.10, in the path attribute, the %% returns %%.

I wonder if you can edit the Samba source to change the % special 
char to another that you like ?

Joris De Pooter

More information about the samba mailing list