Disable Shutdown/Restart Confirmation in Ubuntu 14.04

Ubuntu Shutdown/Restart Confirmation Dialog: Disabling and Enabling
Typically, Ubuntu is set up to display a confirmation dialog whenever you initiate a shutdown or restart of your computer. This same behavior extends to logging out of your account or locking your current session.
This confirmation prompt serves as a protective measure, designed to prevent unintentional system shutdowns or restarts. However, if you are pressed for time, you might initiate a shutdown and then forget about the dialog, potentially leaving your computer running unnecessarily.
NOTE: Disabling the shutdown/restart confirmation dialog will also disable the confirmation prompts for log out and screen lock actions.
It's worth noting that with the confirmation dialog enabled, a dedicated Restart option isn't directly visible in the system menu. Instead, the Restart function is presented within the confirmation dialog itself when you select Shut Down.
Disabling the Confirmation Dialog
To deactivate the shutdown/restart confirmation dialog, initiate a Terminal window by pressing Ctrl + Alt + T. Then, enter the following command and press Enter:
gsettings set com.canonical.indicator.session suppress-logout-restart-shutdown true
Close the Terminal window by clicking the 'X' button located in the upper-left corner.
No system reboot or logout is required for this change to take effect. The Restart option will no longer be visible on the System menu. Selecting Shut Down, Restart, Log Out, or Lock will now execute the chosen action immediately, without any further confirmation.
Re-enabling the Confirmation Dialog
To reactivate the confirmation dialog, open a Terminal window once more. Type the following command and press Enter:
gsettings set com.canonical.indicator.session suppress-logout-restart-shutdown false
Following this, you will once again be prompted to confirm shutdown or restart actions. Exercise caution to avoid accidentally shutting down your system unintentionally.