1748183 會員
3654 線上
108759 解決方案
發表新文章

主机关机的问题

 
watermelonyu
教授

主机关机的问题

大家好:

  我的系统为tru64 5.1,现在上面有一个test普通用户,如何把test设置成可执行关闭或是重启主机的用户呢?就像HP上面要更改/etc/下的配置文件一样?谢谢大家!

8則回覆 8
watermelonyu
教授

主机关机的问题

try 'sudo', let user test have permission to command '/sbin/shutdown', config file at /etc/sudoers
watermelonyu
教授

主机关机的问题

Hi,



Please select the "SystemManagement" from the command "sysman dopconfig" for setting to execute a privileged program without knowing the root password.



Or



Design a special shell program (it should be defined in /etc/sheels) instead of the test (UID=0) account's login shell in /etc/passwd.



Best regards,

Richard.
watermelonyu
教授

主机关机的问题

Matthew老兄:

你讲的那个方法好像不能使用,我man sudo都没有那个命令,而/etc/下也没有sudousers这个文件

Richard Kuo老兄:

  你讲的第一种方法我试了,不行,第二种改UID是可以的,但我需要的不是这种效果,请问还有其它途径可以实现吗?
watermelonyu
教授

主机关机的问题

請先安裝sudo才會有此功能.
watermelonyu
教授

主机关机的问题

Matthew:

 我已经把sudo下载到主机上了

#gunzip sudo-1.6.6

#tar -xvf sudo-1.6.6

#mv sudo-1.6.6 sudo

# setld -l /sudo

setld: /sudo/instctrl: no such file or directory

setld: cannot load control information

#cd sudo

# make install

Make: Don't know how to make install. Stop.

安装不成功呀!

能不能再帮助我!
watermelonyu
教授

主机关机的问题

save attach file as "sudo-1.6.8p9.tar.gz"

# gunzip sudo-1.6.8p9.tar.gz

# tar xvf sudo-1.6.8p9.tar

# cd sudo-1.6.8p9

# ./configure --prefix=/usr/local --mandir=/usr/share/man

# make;make install



after finish, the binary install at /usr/local/sudo



you can try `man sudo` or `man sudoers` for above configuration file



*Note: If you use gcc, you will get warning messages. works fine on 4.0d though 5.1b
watermelonyu
教授

主机关机的问题

更正一下, 檔案在/usr/local/bin
watermelonyu
教授

主机关机的问题

Hi,



>   你讲的第一种方法我试了,不行

First, add the "test1" account to SystemManagement privilege.



Then running the following commands:

# dop -a SystemManagement shutdm "/usr/sbin/shutdown -r now"

# su - test1

% dop shutdm

..



Reboot..

# dop -d shutdm



Best regards,

Richard.