[CentOS] /usr/bin/id behavior since CentOS 5.2 upgrade
johnny at centos.org
Wed Jun 25 09:39:32 UTC 2008
> Hi list,
> Since the upgrade to 5.2, when I log into my server with a ldap account
> I have these 2 errors messages:
> -bash: [: =: unary operator expected
> -bash: [: -le: unary operator expected
> After investigation, the trouble come from two scripts in /etc/profile.d:
> The problem is with the test where the command "id" is involved, like:
> if [ `/usr/bin/id -u` = 0 ] ;
> If I add double quotes ("`/usr/bin/id -u`"), it will work again.
> Indeed, as a connected ldap user, the id command returns nothing when
> [ldapUser at server ~]$ /usr/bin/id -u
> [ldapUser at server ~]$ `/usr/bin/id -u`
> [ldapUser at server ~]$
> As a normal user, the command behaves normally:
> [user at server ~]$ `/usr/bin/id -u`
> -bash: 1302: command not found
> [user at server ~]$ /usr/bin/id -u
> I have modified theses two scripts but I am afraid it will break
> something in the future.
> Any idea on how to resolve this cleanly ?
This is a known upstream bug, please see the release notes:
As stated there, we have an nss_ldap package in the testing repo that
can fix this issue, but it will not be fixed in the official repo until
upsream releases a fix.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.centos.org/pipermail/centos/attachments/20080625/d1f78e2c/signature.bin
More information about the CentOS