Numeric User Gone Bad?
Steve Holmes
steve at holmesgrown.com
Sun Mar 1 17:23:51 EST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
I noticed something lately, like this morning where the numeric
user-id ($UID) doesn't work inside of scripts anymore. Has anyone
else noticed this? I'm running Debian Squeeze so I have the latest
package of espeak and so on. I first noticed the problem in both
talkwith and speakupconf shell scripts. If I echo $UID from a live
shell, I hear the numeric value as I would expect. my normal account
is 1000 and when I echo it from root I hear 0. But when I execute
this command in a shell script, the $UID field always comes up as an
empty string or null so the fore mentioned shell scripts error out.
Hear's a sample test script to try this on.
#!/bin/sh
# Test user id values
echo Numeric user-id = $UID
echo Character user-id = $USER
When I run this script, the second echo command works beautifully but
the first one puts out the string but the value of $UID is apparently
empty because it is omitted.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEAREDAAYFAkmrCvcACgkQWSjv55S0LfFqIQCeJaozeNd/Le2sCx+1rt8ySvCp
fbsAn24t0OIPonCOo9lS1GF4EzH+VC+k
=5Xlv
-----END PGP SIGNATURE-----
More information about the Speakup
mailing list