Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Knoppix Help Forum > How to change /etc/sudoers ?

Forgot Password?
 Knoppix Help Forum   For all discussions about Knoppix, the Linux "Live CD" that lets you run Linux without needing to install on your hard drive.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 06-21-2007   #1 (permalink)
Just Joined!
 
stonerrob420's Avatar
 
Join Date: Jun 2007
Location: Tennessee, USA
Posts: 6
Send a message via AIM to stonerrob420 Send a message via Yahoo to stonerrob420
How to change /etc/sudoers ?

Hi everybody! I'm new to knoppix......I'm using knoppix 5.1 installed to the hard disk.....How do I edit/change the /etc/sudoers file where I can use sudo in the terminal ?
stonerrob420 is offline  


Reply With Quote
Old 06-21-2007   #2 (permalink)
Linux Guru
 
anomie's Avatar
 
Join Date: Mar 2005
Location: Texas
Posts: 1,697
Use the visudo command (do not edit /etc/sudoers directly). You can follow the examples that are already in the file.
anomie is offline   Reply With Quote
Old 06-21-2007   #3 (permalink)
Just Joined!
 
stonerrob420's Avatar
 
Join Date: Jun 2007
Location: Tennessee, USA
Posts: 6
Send a message via AIM to stonerrob420 Send a message via Yahoo to stonerrob420
/etc/sudoers

Found an easier explanation to edit /etc/sudoers. I found it in a different forum. Here it is :

sudo visudo will drop you into a vim session to edit the sudoers file.

To make the changes you want, you will need to add lines like the following under the #Defaults specifications line:


Defaults:root timestamp_timeout=0
Defaults:%admin timestamp_timeout=0
Defaults:short username timestamp_timeout=0


short username is your short username.

Note that you will be using vim to edit this file. Vim is a very nice command line text editor, but its not exactly strait forward to use.

Before you can type text into the window, use the arrow keys to navigate the cursor to the spot where you want to start typing and then enter insert mode by hitting i first. When you are done entering text, hit esc to go back to command mode. Write the file back to disk by typing :w followed by enter. Exit visudo with :q followed by enter.

If you do decide to change your account to a non-admin user, but still want o retain the ability to superuser from the command line, add the following line at the bottom of your sudoers file (with visudo):

short username ALL=(ALL) ALL
stonerrob420 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 11:58 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2