foreverleee 发表于 2007-03-23 16:14

我的系统无法执行whoami

# whoami
whoami: not found


   solaris 9 sparc

bencyber 发表于 2007-03-23 16:23

try /usr/ucb/whoami

ilinch 发表于 2007-03-23 16:26

你可以 看一下你的path变量 估计没有包括/usr/ucb路径 所以无法找到改命令

mrsg 发表于 2007-03-23 16:27

who am i

foreverleee 发表于 2007-03-23 16:34

原帖由 ilinch 于 2007-3-23 16:26 发表
你可以 看一下你的path变量 估计没有包括/usr/ucb路径 所以无法找到改命令


如何把这个/usr/ucb加到PATH中,我的.profile都是一片空白

hail 发表于 2007-03-23 16:46

可以看看/etc/profile这个全局profile文件

foreverleee 发表于 2007-03-23 16:53

原帖由 hail 于 2007-3-23 16:46 发表
可以看看/etc/profile这个全局profile文件

#ident        "@(#)profile        1.19        01/03/13 SMI"        /* SVr4.0 1.3        */

# The profile that all logins get before using their own .profile.

trap ""2 3
export LOGNAME PATH

if [ "$TERM" = "" ]
then
        if /bin/i386
        then
                TERM=sun-color
        else
                TERM=sun
        fi
        export TERM
fi

#        Login and -su shells get /etc/profile services.
#        -rsh is given its environment in its .profile.

case "$0" in
-sh | -ksh | -jsh | -bash)

        if [ ! -f .hushlogin ]
        then
                /usr/sbin/quota
                #        Allow the user to break the Message-Of-The-Day only.
                trap "trap '' 2"2
                /bin/cat -s /etc/motd
                trap "" 2

                /bin/mail -E
                case $? in
                0)
                        echo "You have new mail."
                          ;;
                2)
                        echo "You have mail."
                           ;;
                esac
        fi
esac

umask 022
trap2 3



没有看到什么地方有PATH?

nononhm 发表于 2007-03-23 16:55

#which whoami

foreverleee 发表于 2007-03-23 17:02

原帖由 nononhm 于 2007-3-23 16:55 发表
#which whoami


which whoami
no whoami in /usr/bin /bin /usr/sbin /sbin

remen 发表于 2007-03-23 17:04

chang the /etc/profile,add the /usr/ucb forPATH
sample:
PATH=$PATH:/usr/ccs/bin:/usr/ucb:/usr/local/bin:/usr/local/sbin
export PATH

[ 本帖最后由 remen 于 2007-3-23 17:07 编辑 ]
页: [1] 2 3
查看完整版本: 我的系统无法执行whoami