LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 755|回复: 2

怎样用shell 从非root 用户中退出?

[复制链接]
发表于 2004-11-18 15:59:25 | 显示全部楼层 |阅读模式
手工操作是这样的:

开始是root 用户, 然后用abcd用户名执行 aa.sh 最后返回到root.

su abcd
./aa.sh
exit

但写成shell执行的时候就会停在abcd中,退不回到root中,请问要怎样才能回到root中?
发表于 2004-11-18 20:00:58 | 显示全部楼层
exit
发表于 2004-11-19 06:22:29 | 显示全部楼层
use sudo.

i don't think you can exit from a su/bash command using a script.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表