Changes

From SME Server
Jump to navigationJump to search
Updated section about starting a shutdown on "On Battery" rather than "Low Battery", proper sudo configuration.
Line 268: Line 268:  
         esac
 
         esac
    +
Nut requires to use sudo for this process to work, so sudo needs configuring to enable the user nut. By default the /etc/sudoers file is not part of the SME Server template system. To workaround this create a custom template directory:
 +
mkdir -p /etc/e-smith/templates-custom/etc/sudoers
 +
cd /etc/e-smith/templates-custom/etc/sudoers
   −
Create a custom template directory
+
To preserve the content of the orginal /etc/sudoers file copy that into the custom template directory:
mkdir -p /etc/e-smith/templates-custom/etc/sudoers/30nut
+
  cp /etc/sudoers 10sudoers
  cd /etc/e-smith/templates-custom/etc/sudoers/30nut
      
Create and edit a new file called '30nut' with the following content:
 
Create and edit a new file called '30nut' with the following content:
 
  nut  ALL=NOPASSWD: ALL
 
  nut  ALL=NOPASSWD: ALL
   −
To complete the process
+
Then run:
 +
expand-template /etc/sudoers
 +
 
 +
Finally to complete the process:
 
  signal-event post-upgrade
 
  signal-event post-upgrade
 
  signal-event reboot
 
  signal-event reboot
105

edits

Navigation menu