LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-14-2007, 05:36 PM   #1
jCash
Member
 
Registered: Sep 2006
Posts: 57

Rep: Reputation: 15
SUDO not working but SU WORKS


Can anyone tell me why that occuring? Sudo command is not working when I provide the right password, but su works.

thnx.
 
Old 05-14-2007, 06:07 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
I would say sudo is not setup. You have to edit /etc/sudoers file. But to edit that file you have to use the program called visudo. As root type the command ' visudo ' to edit the file. most default sudoers file contain examples as to do what you are after.

Brian
 
Old 05-14-2007, 06:10 PM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Originally Posted by jCash
Can anyone tell me why that occuring? Sudo command is not working when I provide the right password, but su works.

thnx.
What Linux distribution are you using? Most distros don't use sudo by default (like what Ubuntu does).
 
Old 05-15-2007, 02:11 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,365

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
Just in case you (or anyone else reading this) don't already know this, note that sudo asks for YOUR current password, whereas su asks for the TARGET USER'S password ...

Edit; that's the default of course. Think I've seen a mention that you can force sudo to ask for the root passwd every time.

Last edited by chrism01; 05-16-2007 at 07:22 AM.
 
  


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
LXer: The Ultimate Sudo FAQ — To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
su works but sudo doesn't work. magnum81 Ubuntu 2 04-22-2006 10:52 PM
su to root works sudo doesn't magnum81 Linux - Security 4 04-22-2006 08:29 PM
Permissions in Debian - sudo works, su doesn't (etch/64Studio) greennick Linux - Software 0 09-12-2005 03:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:26 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