Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How can I get augtool (augeas) or a similarly common tool to work with freetds.conf, so I can automate some configuration in a bash install script?

This doesn't seem to work:

augtool print "/files/etc/freetds/freetds.conf"

However, this works (but it uses the inifile lens for some reason, instead of the odbc lens):

augtool print "/files/etc/odbcinst.ini"

What I have tried:

I also followed these instructions to try to associate the odbc lens to freetds.conf:

$ augtool --noload
augtool> set /augeas/load/odbc/lens odbc.lns
augtool> set /augeas/load/odbc/incl /etc/freetds/freetds.conf
augtool> load
augtool> print /files/etc/freetds/freetds.conf

I tried the same with inifile and IniFile in various combinations, but load failed with error: Lens not found Can not find lens IniFile.lns or Can not find lens inifile.lns.

Other Info:

Errors: There doesn't seem to be any errors mentioning freetds or odbc:

$ augtool print "/augeas//error" | grep freetds
$ augtool print "/augeas//error" | grep -i 'freetds\|odbc'

Versions: I am on Ubuntu 14.04. augtool --version shows augtool 1.2.0

The freetds.conf contents:

You can see my freetds.conf at http://pastebin.com/Lt6GiXAJ

It is the default freetds.conf, except that I added the following lines in the [global] section:

    tds version = 8.0
    client charset = UTF-8
share|improve this question
Does print /augeas//error say something about these files? –  ℝaphink Jan 22 at 8:04
Thanks, it found an error in odbcinst.ini, which is read properly after I fixed it. But no errors about freetds.conf. I will update my question with this and some more info. @ℝaphink –  Oleg Jan 22 at 18:33

Your Answer


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

Browse other questions tagged or ask your own question.