Difference between revisions of "Making your DW user a sudo account"

From Dreamwidth Notes
Jump to: navigation, search
(making a guide for DW sudo user)
 
m (format fix)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
This command given in [[Dreamwidth Scratch Installation]] doesn't seem to always work:
+
In recent versions of Ubuntu, this command given in [[Dreamwidth Scratch Installation]] doesn't work automatically:
  
 
  usermod -a -G sudo <i>username</i>
 
  usermod -a -G sudo <i>username</i>
Line 7: Line 7:
 
  dw is not in the sudoers file.  This incident will be reported.
 
  dw is not in the sudoers file.  This incident will be reported.
  
To put your dw user into the sudo group another way, you can also edit the <code>/etc/sudoers</code> file and add a line, depending on which you want.
+
To fix this, edit the <tt>/etc/sudoers</tt> file with your root user and uncomment this line (take off the leading #):
  
If you don't want to enter your password during <code>sudo</code> commands, use:
+
%sudo ALL=NOPASSWD: ALL
  
dw ALL = NOPASSWD: ALL
+
You can also edit the <tt>/etc/sudoers</tt> file and add a line specific to dw instead, depending on which behaviour you want.
  
If you do want to enter your password during <code>sudo</code> commands, use:
+
If you don't want to enter your password during <tt>sudo</tt> commands, use:
 +
 
 +
dw ALL = NOPASSWD: ALL
 +
 
 +
If you do want to enter your password during <tt>sudo</tt> commands, use:
  
 
  dw ALL = (ALL) ALL
 
  dw ALL = (ALL) ALL
  
 
[[Category: Dreamwidth Installation]]
 
[[Category: Dreamwidth Installation]]

Latest revision as of 18:03, 15 March 2009

In recent versions of Ubuntu, this command given in Dreamwidth Scratch Installation doesn't work automatically:

usermod -a -G sudo username

When this happens, trying to use sudo as the dw user can give you this error:

dw is not in the sudoers file.  This incident will be reported.

To fix this, edit the /etc/sudoers file with your root user and uncomment this line (take off the leading #):

%sudo ALL=NOPASSWD: ALL

You can also edit the /etc/sudoers file and add a line specific to dw instead, depending on which behaviour you want.

If you don't want to enter your password during sudo commands, use:

dw ALL = NOPASSWD: ALL

If you do want to enter your password during sudo commands, use:

dw ALL = (ALL) ALL