LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 07-24-2010, 04:38 PM   #1
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Rep: Reputation: 30
sudo psswrd prob.


Hi,
There's something i don't understand. I only used one password while installing Fedora 13, but am having trouble with admin access:

Code:
[fedjond@Fedora13 ~]$ echo 'fedjond ALL=(ALL) ALL' >> /etc/sudoers
bash: /etc/sudoers: Permission denied
[fedjond@Fedora13 ~]$ sudo su
[sudo] password for fedjond:
fedjond is not in the sudoers file. This incident will be reported.
[fedjond@Fedora13 ~]$



Can you point it out please?

thanks for your time

Last edited by nnjond; 07-24-2010 at 04:39 PM.
 
Old 07-24-2010, 04:55 PM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,985

Rep: Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672
Quote:
Originally Posted by nnjond View Post
Hi,
There's something i don't understand. I only used one password while installing Fedora 13, but am having trouble with admin access:

Code:
[fedjond@Fedora13 ~]$ echo 'fedjond ALL=(ALL) ALL' >> /etc/sudoers
bash: /etc/sudoers: Permission denied
[fedjond@Fedora13 ~]$ sudo su
[sudo] password for fedjond:
fedjond is not in the sudoers file. This incident will be reported.
[fedjond@Fedora13 ~]$

Can you point it out please?
thanks for your time
Point out what? That the security on your box is working exactly the way it should be?

You are a non-root user, and are obviously denied access to the file. Either run that command as root (NOT recommended), or use the proper method and run visudo, to put yourself in the sudo'ers file. If you're not in sudoers, you won't be able to run sudo commands, no matter what password, or how many times you try.

Run "su - root", log in as root, and run visudoers to add your user.
 
Old 07-24-2010, 04:57 PM   #3
zirias
Member
 
Registered: Jun 2010
Posts: 361

Rep: Reputation: 59
maybe there is a password set for the root account (the single one you used)? Did you try just "su" with that password?

If it doesn't work, you can always "crack" root locally when you control the machine by passing "init=/bin/sh" to the kernel when booting and then mounting / rw ("mount / -o remount,rw") and setting a new root password with "passwd". Don't forget to remount / ro ("mount / -o remount,ro") before turning off the system.

If you don't want a root password, set something like * or ! as the password hash in /etc/shadow for root, but make sure you can sudo before. On a side note: never edit /etc/sudoers directly, use visudo
 
Old 07-24-2010, 07:06 PM   #4
jefro
Guru
 
Registered: Mar 2008
Posts: 11,965

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
It said sudo won't work so you have to use su or add your name to the sudoers list. It asks for the admin password not your user.
 
Old 07-24-2010, 07:55 PM   #5
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

Rep: Reputation: 79
Quote:
Originally Posted by zirias View Post
If it doesn't work, you can always "crack" root locally when you control the machine by passing "init=/bin/sh" to the kernel when booting and then mounting / rw ("mount / -o remount,rw") and setting a new root password with "passwd". Don't forget to remount / ro ("mount / -o remount,ro") before turning off the system.
Thankfully, unlike Ubuntu (and debian?), Fedora doesn't by default password single user mode so just easier to place a 1 at the end of the kernel line, no messing about then.
 
  


Reply

Tags
password, root login


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:36 AM
Problem with SUDO : sudo: pam_authenticate: Module is unknown cristoph_ Linux - Software 2 03-02-2009 08:12 PM
sudo blkid vs. sudo fdisk -l problems alienexplorers Linux - Newbie 1 01-13-2009 01:35 AM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 04:20 PM
How do I tell sendmail to use my ISP's outgoing mail server which needs name & psswrd Wolfy Linux - Networking 1 09-02-2004 04:16 AM


All times are GMT -5. The time now is 02:18 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration