Solved

unable to edit using visudo Ubuntu 12.04

Posted on 2013-06-17
3
302 Views
Last Modified: 2013-06-18
Hello, I am trying to edit my sudoers file on my Ubuntu machine but I am unable to do this. When I run the command sudo visudo I get a screen as the one shown in my attachment. Once I add a line in the file I am not able to save it. Can someone let me know what I need to do? Thank you.

A
visudo.PNG
0
Comment
Question by:aej1973
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Accepted Solution

by:
PaulNSW earned 300 total points
ID: 39255312
What error message do you get when you try to save it?

Press Ctrl and X, it should then prompt to save changes. Once you choose Yes, it should give an error message as to why it cannot save.
0
 
LVL 88

Expert Comment

by:rindi
ID: 39255378
Did you read the comments in the sudoers file (they are in the screenshot you posted):

#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#

According to that you should create a file in the folder /etc/sudoers.d/ in which you have your changes to the original sudoers file.
0
 

Author Comment

by:aej1973
ID: 39256338
Thank you, I had to press ctrm M to append the changes.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question