Possible Duplicate:
ubuntu - how can I avoid typing a password on every admin action?

Googled and tried various approaches to solve the password-less sudo access commands, but none seem worked for me. The server is Ubuntu 10.04

I've a deploy user under deploy group. I added the deploy user Through google search and even all SF search combination, nothing worked. Following is my /etc/sudoers file

deploy@myserver:~$ id
uid=1000(deploy) gid=1001(deploy) groups=0(root),107(admin),1001(deploy),1002(rvm)
deploy@myserver:~$ groups
deploy root admin rvm
deploy@myserver:~$ sudo cat /etc/sudoers
# /etc/sudoers
Defaults    env_reset
root    ALL=(ALL) ALL
deploy  ALL=(ALL) ALL

%sudo ALL=(ALL) ALL
#includedir /etc/sudoers.d

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
%wheel ALL=(ALL) ALL

When I try to open up /etc/sudoers with visudo command, Permission denied

deploy@myserver:~$ visudo
visudo: /etc/sudoers: Permission denied
visudo: /etc/sudoers: Permission denied

marked as duplicate by mailq, voretaq7, MikeyB, MDMarra, Iain Dec 7 '11 at 22:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    can you try "sudo visudo"? – pablo Oct 23 '11 at 18:34
  • Is there a question here? – voretaq7 Oct 23 '11 at 21:27
  • Oh! holy cow! What was I smoking??? Sorry guys. – Autodidact Oct 25 '11 at 5:39

How would you expect sudo to do its magic if you don't actually use sudo? What you need to do here is run sudo visudo.

  • Yup, holy cow! What was I smoking??? Sorry buddy. – Autodidact Oct 25 '11 at 5:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.