[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: 'unary operator expected' error when TLS turned on - SOLVED

On Sunday 31 May 2009 16:24:49 John Kane wrote:
> Adding the 'set -x' option top of /etc/profile, I was able to determine
> the culprit of the
> "-bash: [: =: unary operator expected"
> error that has been occurring on all Linux servers since turning on LDAP
> TLS on INT.
> In the file:
> /etc/profile.d/krb5-workstation.sh
> The follow is causing the issue:
> if ! echo ${PATH} | /bin/grep -q /usr/kerberos/sbin ; then
>         if [ `/usr/bin/id -u` = 0 ] ; then
>                 PATH=/usr/kerberos/sbin:${PATH}
>         fi
> fi
> If I add " " around the backticked command, I the bash error goes away.
> Not sure who I need to open a ticket against :-)

Depends if you want the bug to be fixed (which, while satisfying, will still 
leave you with real problems), or fix your configuration issue which prevents 
users from looking up their own user details (such as numerical uid), which is 
sure to break some applications.

You should probably investigate why the output 'id -u' is empty, most likely 
it is permissions on the certificate.

'ls -l /etc/openldap/cacerts/cacert.pem'

If that's not it, you need to look further.

 You can probably track it down with 'strace -e open id -u', or similar.