您的位置:首页 > 运维架构 > Shell

解决su – 后显示-bash-4.1#

2015-09-25 19:31 573 查看
<1>现象

设置tfs的管理用户时。

su - admin时,出现

-bash-4.1#

<2>解决

chown admin:admin /home/admin #授予admin用户权限

把其他机器的.bashrc和.bash_profile

[root@dongruan-tfs173 admin]# su - admin
-bash: sh_profile: command not found #少copy了一些东西,出现了如下错误,可推断下一条也是admin用户环境变量的问题.按照这个思路排查即可.
-bash: shrc: command not found

[root@dongruan-tfs173 admin]# cat .bash_profile

sh_profile #该是“#bash_profile”
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: