From 91b93b1f854bdf054acebb3e11ea552401c5bf59 Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Thu, 18 Dec 2014 12:08:33 +0100 Subject: [PATCH] set trc6500 user to a configuration menu --- install_debian.txt | 1 + master/etc/sudoers.d/pdmenu | 12 ++++++------ master/etc/sudoers.d/webconfig | 8 ++++---- master/etc/webconfig/alias.csv | 2 +- master/root/debian-list.txt | 1 + 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/install_debian.txt b/install_debian.txt index 43c780c..ba1f1d9 100644 --- a/install_debian.txt +++ b/install_debian.txt @@ -55,4 +55,5 @@ Step 3: update-rc.d checkudevrules enable update-rc.d checkudevrules defaults chown webconfig /etc/webconfig/alias.csv /etc/dhcp/dhcpd.conf + chsh -s /usr/bin/pdmenu trc6500 reboot diff --git a/master/etc/sudoers.d/pdmenu b/master/etc/sudoers.d/pdmenu index 56644bf..53c247d 100644 --- a/master/etc/sudoers.d/pdmenu +++ b/master/etc/sudoers.d/pdmenu @@ -1,7 +1,7 @@ -# /etc/sudoers.d/pdmenu +# /etc/sudoers.d/trc6500 -pdmenu ALL = (root)NOPASSWD: /opt/trc6500/script/check_network.sh -pdmenu ALL = (root)NOPASSWD: /sbin/halt -pdmenu ALL = (root)NOPASSWD: /usr/sbin/service ammwake -pdmenu ALL = (root)NOPASSWD: /usr/sbin/service ipmiwake -pdmenu ALL = (root)NOPASSWD: /usr/sbin/service trc6500 +trc6500 ALL = (root)NOPASSWD: /opt/trc6500/script/check_network.sh * +trc6500 ALL = (root)NOPASSWD: /sbin/halt +trc6500 ALL = (root)NOPASSWD: /usr/sbin/service ammwake * +trc6500 ALL = (root)NOPASSWD: /usr/sbin/service ipmiwake * +trc6500 ALL = (root)NOPASSWD: /usr/sbin/service trc6500 * diff --git a/master/etc/sudoers.d/webconfig b/master/etc/sudoers.d/webconfig index caaba36..b021651 100644 --- a/master/etc/sudoers.d/webconfig +++ b/master/etc/sudoers.d/webconfig @@ -1,7 +1,7 @@ # /etc/sudoers.d/webconfig -webconfig ALL = (root)NOPASSWD: /opt/trc6500/script/check_network.sh +webconfig ALL = (root)NOPASSWD: /opt/trc6500/script/check_network.sh * webconfig ALL = (root)NOPASSWD: /sbin/halt -webconfig ALL = (root)NOPASSWD: /usr/sbin/service ammwake -webconfig ALL = (root)NOPASSWD: /usr/sbin/service ipmiwake -webconfig ALL = (root)NOPASSWD: /usr/sbin/service trc6500 +webconfig ALL = (root)NOPASSWD: /usr/sbin/service ammwake * +webconfig ALL = (root)NOPASSWD: /usr/sbin/service ipmiwake * +webconfig ALL = (root)NOPASSWD: /usr/sbin/service trc6500 * diff --git a/master/etc/webconfig/alias.csv b/master/etc/webconfig/alias.csv index d7713f0..05a7fdc 100644 --- a/master/etc/webconfig/alias.csv +++ b/master/etc/webconfig/alias.csv @@ -51,7 +51,7 @@ http://10.133.28.160:8232;/usr/share/webconfig;;Switch Gonio 2;:goto: http://10.133.28.254;/usr/share/webconfig;;GPS;:goto: ;;;TRC6500 MIB; /swb;/usr/share/swb;/var/cache/webconfig/snmp.tree;SNMP Web Browser;/opt/trc6500/bin/snmp-trc6500-walk|sed 's/enterprises\.thales\.//'>/var/cache/webconfig/snmp.tree -;;;Chassis actions +;;;Chassis actions; ammwake;/usr/share/webconfig;;Power on all HS22 IBM slaves;sudo service ammwake start ipmiwake;/usr/share/webconfig;;Power on all SuperMicro slaves;sudo service ipmiwake start ammwake;/usr/share/webconfig;;Power off all HS22 IBM slaves;sudo service ammwake stop diff --git a/master/root/debian-list.txt b/master/root/debian-list.txt index 446be7e..45f380e 100644 --- a/master/root/debian-list.txt +++ b/master/root/debian-list.txt @@ -209,6 +209,7 @@ par2 passwd patch pciutils +pdmenu perl-base procmail procps -- 2.30.2