credentialsを使用してマウントする際にエラーになる

CentOSからWindows上の共有フォルダをマウントする際に以下のコマンドを実行したら、エラーに。

#mount -t cifs //192.168.xxxx.xxxx/share /winsv/share -o credentials=/etc/cred_file
mount error 13 = Permission denied"


あれ?と思ってcredentialsを使わずにuser=xxx,password=xxxxで実行したらOK。
ユーザ名もパスワードも間違ってないのになんで?と調べたら、sambaのバグであるらしい。
PW行の最後に改行文字が入っていると、NGとのこと。
https://bugzilla.redhat.com/show_bug.cgi?id=532153

パッチを当ててもよかったけど面倒なので

# printf "username=xxxx\npassword=xxxxx" > /cred_file

でOK。