LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-08-2006, 11:06 AM   #1
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Rep: Reputation: 30
No password for sudo?


How would I setup my user and system so that I wouldn't have to input my password when I sudo?

Thanks!
 
Old 05-08-2006, 11:08 AM   #2
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
You put "NOPASSWD:" before the list of commands, like it says in the man page.
 
Old 05-08-2006, 11:32 AM   #3
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
I ran visudo as root and added NOPASSWD: before my username, as it is the only entry in there besides root, and it said that there was a syntax error. I'm not entirely sure what you mean, can you explain with a little more detail please?

Thank you for your help!
 
Old 05-08-2006, 12:09 PM   #4
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
NOPASSWD goes before the list of commands, after your username and host list. The man page has this example:

Quote:
ray rushmore = NOPASSWD: /bin/kill, /bin/ls, /usr/bin/lprm
 
Old 05-11-2006, 12:11 PM   #5
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
What if I would like a user to execute any command with sudo?

I'm not sure what man page you are referencing, I haven't seen this information anywhere :P
 
Old 05-11-2006, 02:05 PM   #6
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
You can use the ALL keyword, e.g.

Quote:
joe host_alias = ALL
Note that this is potentially dangerous (ANY command can be run as root), so use with care!

The man page is sudoers(5).
 
Old 05-11-2006, 02:17 PM   #7
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
I put in visudo:

dave ALL=(ALL) NOPASSWD: ALL
 
Old 05-11-2006, 08:23 PM   #8
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
It'll work but as has been said above, not the brightest idea on earth.
 
Old 05-11-2006, 08:42 PM   #9
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
It's just a personal laptop that only I use ... would there still be a reason that it's a bad idea?
 
Old 03-18-2012, 10:08 AM   #10
bert07
Member
 
Registered: Jul 2007
Location: Belgium, Heist-op-den-Berg
Distribution: Debian, Mageia, Windows, Puppy, and about 50 others on or off
Posts: 77

Rep: Reputation: 17
sudoers

In de sudoers of Lucid, I added

bert ALL=(ALL) NOPASSWD: ALL

This works well on Lucid.

But it does not work on Debian 6.04, openSUSE 11.4, Mageia 1, Linux Mint 11 & Linux Mint 12.

What need I do to make it work?

Any one?

Bert.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sudo password...? yubimusubi Linux - General 15 09-04-2009 12:08 AM
sudo password problem Murdock1979 Linux - General 6 04-26-2006 11:39 PM
make sudo ask for a password andy753421 Linux - Security 1 01-13-2005 07:32 PM
root password doesn't work when I use sudo ... bucovaina78 Linux - Security 5 11-10-2004 02:50 PM
Piping password to sudo Umek Linux - General 7 03-21-2004 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration