解决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
设置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
相关文章推荐
- Linux开机执行shell命令
- shell脚本基础进阶(四)----作业
- adb shell kill -3 pid
- shell脚本1.0
- bash sed和awk
- bash sed和awk
- shell脚本学习 二
- KB:Exchange控制台打开缓慢
- linuxshell中"2>&1"含义
- eval用法 【shell】
- shell中单引号、双引号、反引号、反斜杠的区别
- shell以及sed awk总结
- 马哥linux学习(bash shell学习)
- Linux学习日记--基础命令(7)--bash中的变量,配置文件
- PowerShell 4.0实现自动化设置服务器
- Shell脚本调用mysql语句
- Google Shell Style Guide
- Google Shell Style Guide
- 揭秘PowerShell 5.0新特性和新功能
- shell函数返回值