Skip to Content.
Sympa Menu

freetds - [freetds] Securely specifying passwords for freebcp and such

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Benjamin Moody <benjamin.moody AT gmail.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] Securely specifying passwords for freebcp and such
  • Date: Thu, 2 Aug 2018 19:45:42 +0000

There's a useful feature which is not mentioned in the FreeTDS man
pages: for several of the command-line tools, if you specify the
option '-P -', the password will be read from standard input. This is
the case for tsql, freebcp, defncopy, and bsqldb.

The feature isn't all that useful for tsql, but for the other tools,
it may be a helpful option for batch processing. Indeed, at least for
freebcp, it appears to be the only secure way to supply a password
(on a system where program command lines are visible to everyone via
/proc/.)

(For example, in a shell script:

freebcp [...] -U "$user" -P "$pass"

typically allows other users to see the password using 'ps', but

freebcp [...] -U "$user" -P - <<EOF
$pass
EOF

doesn't.)

So, this feature should probably be documented.




Archive powered by MHonArc 2.6.24.

Top of Page