/usr/bin/id behavior since CentOS 5.2 upgrade
On Wed, Jun 25, 2008 at 11:31 AM, kfx <email@example.com> wrote:
> 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@server ~]$ /usr/bin/id -u
> [ldapUser@server ~]$ `/usr/bin/id -u`
> [ldapUser@server ~]$
> As a normal user, the command behaves normally:
> [user@server ~]$ `/usr/bin/id -u`
> -bash: 1302: command not found
> [user@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 ?
Read the release notes
(http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.2) and check the
known issues section and the piece about nss_ldap.
Tim Verhoeven - firstname.lastname@example.org - 0479 / 88 11 83
Hoping the problem magically goes away by ignoring it is the
"microsoft approach to programming" and should never be allowed.
CentOS mailing list