当前位置: 代码迷 >> Web前端 >> su罗致bash: xxxxxx: command not found解决 (2012-03-12 18:02:19)a
  详细解决方案

su罗致bash: xxxxxx: command not found解决 (2012-03-12 18:02:19)a

热度:659   发布时间:2012-08-29 08:40:14.0
su导致bash: xxxxxx: command not found解决 (2012-03-12 18:02:19)a

?

现象:

?

?

?

1.登录root账号,使用adduser testuser和passwd testuser新建用户

2.su testuser到新账号下,使用任何命令都显示bash: datestamp_for_history: command not found

?

?

?

原因:

?

?

?

1.su   只能切换用户权限,不使用原用户的登陆脚本和搜索路径 

2.su - 不但能切换用户权限,还能使用原用户的登陆脚本和搜索路径

之前是在root账号下直接SU切换到testuser用户。

?

?

解决:

?

?

?

退出换成SU - 再切换到testuser用户就好了。

使用su - 环境变量也跟着来啦~
?

?

?

  相关解决方案