|
发表于 2006-8-16 15:03:38
|
显示全部楼层
no problem. the GUI isn't that important. you can use zenity if you want. the most important is to create a new copy of itself instead of 'fork'. The way you did was just return to the normal user shell context. So you need "exec". You will need to play with it. Try 'exec pass $password' and in the pass expect program, call 'spawn ssh -s admin.sh'. This way, admin.sh will be called from root. Also, in order to bypass the pass call from admin.sh when root is running it, you need a wrapper check around it. |
|