[sudo-users] Sudo: parse error in /etc/sudoers near line -1

Eugene J. Pate Eugene.Pate at panduit.com
Tue Jun 9 12:38:32 MDT 2015


Below is a copy of my sudo file
rimini is the group I'm having problems with, I can sudo to viprsrm without the parse error.
   
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
#
# User alias specification
#
# Cmnd alias specification
#
# Defaults specification
#
# Runas alias specification
#
# User privilege specification
root    ALL=(ALL) ALL
#
# Uncomment to allow people in group wheel to run all commands
# %wheel        ALL=(ALL) ALL
#
# Same thing without a password
# %wheel        ALL=(ALL) NOPASSWD: ALL
#
# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now

# let oracle accounts do some things to start/stop the database
oratst  ALL=(appltst)   NOPASSWD:ALL
oravis  ALL=(applvis)   NOPASSWD:ALL
oracle  ALL=(applmgr)   NOPASSWD:ALL
orat01a ALL=(applt01a)  NOPASSWD:ALL

sadbam  ALL=(oracle)    NOPASSWD:ALL
sadba   ALL=(oracle)    NOPASSWD:ALL
sadbam  ALL=(applmgr)   NOPASSWD:ALL
sadba   ALL=(applmgr)   NOPASSWD:ALL

#allows user viprsm to run the inq command
viprsrm ALL=(ALL)       NOPASSWD:/usr/lpp/EMC/Symmetrix/bin/inq.aix64_51

#Rimini Street accounts can sudo as oracle or applmgr
%rimini ALL=(oracle)    NOPASSWD:ALL
%rimini ALL=(applmgr)   NOPASSWD:ALL

-----Original Message-----
From: sudo-users [mailto:sudo-users-bounces at sudo.ws] On Behalf Of Todd C. Miller
Sent: Tuesday, June 09, 2015 1:15 PM
To: Eugene J. Pate
Cc: sudo-users at sudo.ws
Subject: Re: [sudo-users] Sudo: parse error in /etc/sudoers near line -1

On Tue, 09 Jun 2015 16:13:28 -0000, "Eugene J. Pate" wrote:

> Hi guys I'm receiving the following error on an AIX server, can someone help?
> 
> Sudo su - oracle
> "Sudo: parse error in /etc/sudoers near line -1"

You should try running visudo as root.  Chances are there is a syntax error on the first line.  If you just want to check the syntax you can run:

# visudo -c

 - todd
____________________________________________________________
sudo-users mailing list <sudo-users at sudo.ws> For list information, options, or to unsubscribe, visit:
http://www.sudo.ws/mailman/listinfo/sudo-users


More information about the sudo-users mailing list