From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Description of problem: When logging in using pdksh as the login shell, the following (benign) error is generated: /etc/profile[17]: [: argument expected Line 17 in /etc/profile: if [ $EUID = 0 ]; then ... fi While both Bash and PDKSH use /etc/profile at login, only bash provides an EUID environment variable. The if statement on line 17 should be changed to if [ "$EUID" = "0" ]; then ... fi Version-Release number of selected component (if applicable): setup-2.5.44-1 How reproducible: Always Steps to Reproduce: 1.specify the korn shell (pdksh) as login shell 2.login 3.see error Actual Results: /etc/profile[17]: [: argument expected Additional info:
Alternatively, you could change this back to the version used in FC3 which invoked the 'id' command to determine the effective UID of the current process. Note that the backtick method of invoking commands from shell scripts has been deprecated for quite some time in favor of $(cmd). For example, instead of `id -u`, one should use $(id -u) in bourne/korn/bourneagain scripts.
EUID is used becasue id is in /usr/bin. Fixed in CVS, will be in future builds.
If someone (as I usually do) uses usermod(1m) to change the root shell from bash to ksh, then the PATH will not include the sbin directories on root logins. You cannot correctly rely on EUID in this case.
# ksh workaround if [ -z "$EUID" -a -x /usr/bin/id ]; then EUID=`id -u` UID=`id -ru` fi added in 2.5.45-1.
*** Bug 161433 has been marked as a duplicate of this bug. ***
*** Bug 171861 has been marked as a duplicate of this bug. ***
*** Bug 171945 has been marked as a duplicate of this bug. ***
*** Bug 173784 has been marked as a duplicate of this bug. ***
*** Bug 176265 has been marked as a duplicate of this bug. ***