LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 06-17-2006, 08:30 AM   #1
unisol
Member
 
Registered: May 2005
Location: philadelphia,pa.
Distribution: ubuntu feisty 7.04,debian etch
Posts: 147

Rep: Reputation: 15
cannot edit /etc/sudoers


ubuntu desktop keeps telling me that my password is invalid however i cant get into /etc/sudoers to edit it any ideas
 
Old 06-17-2006, 08:51 AM   #2
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
First we need answers to these questions

1) Are you able to login to the system with your account (GUI / text)?
2) Are you able to login to the system with root account (GUI / text)?
3) Is your current account an admin account?
 
Old 06-17-2006, 08:56 AM   #3
unisol
Member
 
Registered: May 2005
Location: philadelphia,pa.
Distribution: ubuntu feisty 7.04,debian etch
Posts: 147

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by manishsingh4u
First we need answers to these questions

1) Are you able to login to the system with your account (GUI / text)?
2) Are you able to login to the system with root account (GUI / text)?
3) Is your current account an admin account?
1yes i am able to log in to the system with account (gui) 2no i cant log into system root account an 3yes im the only user
 
Old 06-17-2006, 09:01 AM   #4
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
Alright, so ur system password is correct. Try this command
Code:
sudo visudo
When it asks for a password, enter your own password. Now you can change your /etc/sudoers file. (Be careful). However, why do u need access to this file?
 
Old 06-17-2006, 09:05 AM   #5
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Code:
root@aihua:/home/staff# vi sudo
 
Old 06-17-2006, 09:23 AM   #6
unisol
Member
 
Registered: May 2005
Location: philadelphia,pa.
Distribution: ubuntu feisty 7.04,debian etch
Posts: 147

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by manishsingh4u
Alright, so ur system password is correct. Try this command
Code:
sudo visudo
When it asks for a password, enter your own password. Now you can change your /etc/sudoers file. (Be careful). However, why do u need access to this file?
ineed it for for root privileges i cant even use the dialup applet as it says invalid password
 
Old 06-17-2006, 10:17 AM   #7
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
Quote:
Originally Posted by unisol
ineed it for for root privileges i cant even use the dialup applet as it says invalid password
So, is your problem solved?
 
Old 06-17-2006, 11:39 AM   #8
aysiu
Senior Member
 
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,775

Rep: Reputation: 86
http://www.psychocats.net/ubuntu/sudo should help you.
 
Old 06-17-2006, 04:13 PM   #9
unisol
Member
 
Registered: May 2005
Location: philadelphia,pa.
Distribution: ubuntu feisty 7.04,debian etch
Posts: 147

Original Poster
Rep: Reputation: 15
sudoers

Quote:
Originally Posted by manishsingh4u
So, is your problem solved?
no it didnt help i dont know what to do now i really thought that was going to fix the problem
 
Old 06-17-2006, 04:55 PM   #10
unisol
Member
 
Registered: May 2005
Location: philadelphia,pa.
Distribution: ubuntu feisty 7.04,debian etch
Posts: 147

Original Poster
Rep: Reputation: 15
ediiting sudoers

Quote:
Originally Posted by manishsingh4u
So, is your problem solved?
no sorry but im not sure how to use nano or vi i booted into recovery and could have edited the file but like i said i dont know how to use these editors i mainly use gedit
 
Old 06-17-2006, 05:01 PM   #11
unisol
Member
 
Registered: May 2005
Location: philadelphia,pa.
Distribution: ubuntu feisty 7.04,debian etch
Posts: 147

Original Poster
Rep: Reputation: 15
ediiting sudoers

Quote:
Originally Posted by manishsingh4u
So, is your problem solved?
no sorry but im not sure how to use nano or vi i booted into recovery and could have edited the file but like i said i dont know how to use these editors
 
Old 06-18-2006, 08:07 AM   #12
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You can run "vimtutor" to learn how to use vim.

For what you want to do, you only need to use "i" to enter the insert mode. Then make your changes. When you are done with your edits, press the escape key. Then enter ":wq" to save your changes.

Last edited by jschiwal; 06-18-2006 at 08:09 AM.
 
Old 06-18-2006, 08:24 AM   #13
unisol
Member
 
Registered: May 2005
Location: philadelphia,pa.
Distribution: ubuntu feisty 7.04,debian etch
Posts: 147

Original Poster
Rep: Reputation: 15
editing sudoers

thank for everything i got my system/ adminstration apps back now i dont have sound i tried lspci |grep audio it told me i had a soundblaster live EMU10k1 so i did sudo modprobe snd-emu10k0 which is the soundcard i have, but it didnt work also firefox wont load i tried reinstalling it no ood mayb uninstall and reinstall

Last edited by unisol; 06-18-2006 at 08:26 AM.
 
Old 06-18-2006, 09:35 AM   #14
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
The very first user you created when you installed ubuntu has sudo priviledges, users added later need to have these priviledges added manually, as you have discovered.
If you want other users (and it looks like this includes you at the moment) to have the same sort of priviledges (including sound) then you'll need to add them to the following groups:
adm dialout cdrom floppy audio dip video plugdev lpadmin scanner
Go to "System Settings" then "Users & Groups" to do this.

HTH
 
  


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
How to edit "/etc/sudoers" lchxr Fedora 5 04-02-2006 11:29 AM
visudo lets me edit sudoers but not save ver 3.3.1 suguru MEPIS 4 12-19-2005 06:23 AM
I deleted /etc/sudoers and creates a new file call sudoers but now it doesnt for visu abefroman Linux - Software 1 11-10-2005 05:03 PM
sudoers???? yenonn Slackware 6 02-10-2004 03:09 AM
help with /etc/sudoers keevitaja Linux - Newbie 5 08-17-2002 01:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 07:11 AM.

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