logo       

Re: -bash: [: : integer expression expected: msg#00024

ldap.padl.nss

Subject: Re: -bash: [: : integer expression expected

On Thu, 2006-09-14 at 07:14 +0100, Howard Wilkinson wrote:
> Somewhere in the .bashrc, .bash_profile or /etc/profile ... files is
> an expression of the form
>
> if [ .... ] ; then
>
> The ... contents contains a reference to something derived from a
> userid or a groupid and is not getting set when the group or passwd
> map is being interrogated. Something broke in your upgrade. Check the
> results of getent passwd and getent group to see if a user no longer
> shows up or if an entry is malformed.

Ahh yes, I see in /etc/profile:
if [ "`id -u`" -eq 0 ]; then
>
However id -u doesn't return anything, hence the 'integer expression'
error.

So this is a syptom rather than the underlying problem.

Now upon doing a getent passwd I notice something I missed earlier:
sshd:x:101:65534::/var/run/sshd:/bin/false
snmp:x:103:65534::/var/lib/snmp:/bin/false
dcross:*:2001:2001:dcross:/home/users/dcross:/bin/sh

dcross is my user in ldap. That asterisk looks a bit out of place.

If I run the same in a server that is still running libnss-ldap 238 I
see:
snmp:x:103:65534::/var/lib/snmp:/bin/false
dcross:x:2001:2001:dcross:/home/users/dcross:/bin/sh

getent group looks the same (asterisk vs x).

I've gone through the nss-ldap conf and cannot see anything that causes
this. It just leaves me quite stumped.

Ideas?

Thanks



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise