Unix/Linux Go Back    

Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Help me to edit sudo file


Thread Tools Search this Thread Display Modes
Old Unix and Linux 03-06-2013   -   Original Discussion by welcome23
welcome23 welcome23 is offline
Registered User
Join Date: Mar 2013
Last Activity: 12 March 2013, 9:04 AM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Help me to edit sudo file

I am trying to edit sudoers file by running the command #visudo. But it is not opening and error showing like 'it is read only filesystem'.

Than I changed the permissions of /etc/sudoers file to 640 and modified it(after I change the permission to 440). Than it is modified successfully. But sudo access is not working.

After investigating I found that in /usr/local/etc/sudoers file, the modified fields are not updated. Even it is not allowing to change the permissions of this file. I tried it as a root user.

Please help me to resolve this issue.
Sponsored Links
Old Unix and Linux 03-07-2013   -   Original Discussion by welcome23
DGPickett DGPickett is offline Forum Advisor  
Registered User
Join Date: Oct 2010
Last Activity: 1 February 2016, 3:35 PM EST
Location: Southern NJ, USA (Nord)
Posts: 4,673
Thanks: 8
Thanked 587 Times in 560 Posts
Did you modify it using visudo after chmod?

Man Page for sudoers (all Section 5) - The UNIX and Linux Forums

The sudoers file should always be edited by the visudo command which
locks the file and does grammatical checking. It is imperative that
sudoers be free of syntax errors since sudo will not run with a
syntactically incorrect sudoers file.
Sponsored Links
Old Unix and Linux 03-10-2013   -   Original Discussion by welcome23
MadeInGermany MadeInGermany is offline Forum Staff  
Join Date: May 2012
Last Activity: 19 November 2017, 9:36 PM EST
Location: Simplicity
Posts: 3,824
Thanks: 318
Thanked 1,281 Times in 1,159 Posts
Supposed your sudo|visudo commands use /usr/local/etc/sudoers,
then check its file system with

df /usr/local/etc/sudoers

If this is NFS then one must edit|visudo it on a machine with trusted root access.
Trusted root: the NFS server exported the file system with root=machine.
Maybe there is another sudo installation that takes another sudoers that is on the local disk?
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Sudo and edit other user's info. linuxadmin UNIX for Advanced & Expert Users 1 12-04-2012 05:16 AM
ssh foo.com sudo command - Prompts for sudo password as visible text. Help? fluoborate Shell Programming and Scripting 9 11-02-2011 03:18 PM
Best way to edit a file skunky Shell Programming and Scripting 13 12-21-2010 01:20 PM
Script to Edit the file content and create new file sudesh.ach Shell Programming and Scripting 1 06-22-2009 06:46 AM
Edit value in File sewood Shell Programming and Scripting 1 03-18-2008 03:11 AM

All times are GMT -4. The time now is 12:06 AM.