AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Operatingsystems
#Servers
#AIX
#Power

 View Only
Expand all | Collapse all

SUDO Configuration get warnings. Please help. Hope to hear from you.

Archive User

Archive UserMon December 10, 2007 07:41 PM

Archive User

Archive UserMon December 24, 2007 06:05 AM

  • 1.  SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Mon December 10, 2007 06:29 AM

    Originally posted by: apple08


    Dear AIX Gurus,
    I editted the visudo file. when i tried to save the file, it prompted with these warnings.

    Warning: undeclared Cmnd_Alias `AIX_BACKUP' referenced near line 33
    Warning: undeclared Cmnd_Alias `AIX_BACKUP' referenced near line 34
    Warning: undeclared Cmnd_Alias `AIX_MONITOR' referenced near line 34
    Warning: undeclared Cmnd_Alias `AIX_CHPASSWD' referenced near line 34
    Warning: undeclared Cmnd_Alias `AIX_USERMGMT' referenced near line 34
    visudo: sudoers file unchanged.

    Attached is the my sudo configuration file. Please help. Hope to hear from you.
    #AIX-Forum


  • 2.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Mon December 10, 2007 08:20 AM

    Originally posted by: SystemAdmin


    Your syntax on lines 33 and 34 is mangled. These lines are supposed to be something like:

    user machine = command

    where each of "user", "machine" and "command" are typically aliases. You've put user aliases to the right of the equal sign which is why it's complaining about them as command aliases not found.

    HTH

    Jim Lane
    #AIX-Forum


  • 3.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Mon December 10, 2007 09:07 AM

    Originally posted by: apple08


    sudo
    #AIX-Forum


  • 4.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Mon December 10, 2007 09:07 AM

    Originally posted by: apple08


    Dear AIX Gurus,
    Meaning, I have to declare the AIX_BACKUP,AIX_MONITOR, AIX_CHPASSWD and AIX_USERMGMT inside Cmnd_Alias as per below right?
    Cmnd_Alias AIX_OPERATOR = /usr/sbin/reboot, /usr/sbin/shutdown

    Cmnd_Alias AIX_ADMIN = /bin/crontab, /bin/iostat, /bin/more, /bin/last, /bin/mv,
    /bin/cp, /bin/ls, /bin/cd, /usr/sbin/umount, /usr/sbin/mount, /bin/netstat, /bi
    n/vmstat, /usr/sbin/topas, /bin/df, /usr/sbin/ifconfig, /bin/gzip, /bin/tar, /bi
    n/tar, /bin/cat, /bin/rm
    Cmnd_Alias AIX_BACKUP = NEED TO ADD?
    Cmnd_Alias AIX_MONITOR = NEED TO ADD?
    Cmnd_Alias AIX_MONITOR = NEED TO ADD?

    Thanks a lot. Hope to hear from you. I'm very happy to hear the respond from the expert.

    Warning: undeclared Cmnd_Alias `AIX_BACKUP' referenced near line 33
    Warning: undeclared Cmnd_Alias `AIX_BACKUP' referenced near line 34
    Warning: undeclared Cmnd_Alias `AIX_MONITOR' referenced near line 34
    Warning: undeclared Cmnd_Alias `AIX_CHPASSWD' referenced near line 34
    Warning: undeclared Cmnd_Alias `AIX_USERMGMT' referenced near line 34
    #AIX-Forum


  • 5.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Mon December 10, 2007 09:43 AM

    Originally posted by: hwyguy


    Yes, You'll need to either remove the references to AIX_BACKUP, AIX_MONITOR, AIX_CHPASSWD and AIX_USERMGMT, or define them to suppress the warnings.
    #AIX-Forum


  • 6.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Mon December 10, 2007 07:40 PM

    Originally posted by: apple08


    My problem solved. Thanks a lot. :)
    #AIX-Forum


  • 7.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Mon December 10, 2007 07:41 PM

    Originally posted by: apple08


    Thanks a lot. :)
    #AIX-Forum


  • 8.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Tue December 18, 2007 11:57 PM

    Originally posted by: apple08


    I would like to know about the sudo log
    #AIX-Forum


  • 9.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Wed December 19, 2007 12:07 AM

    Originally posted by: apple08


    Dear AIX gurus,
    where can i get the sudo log? hope to hear from you
    #AIX-Forum


  • 10.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Wed December 19, 2007 07:26 AM

    Originally posted by: SystemAdmin


    It depends. By default sudo uses syslog with facility local2. To see anything you need to modify /etc/syslog.conf because local2 is disabled by default. However you can change all of this in the sudoers file. You can specify a different syslog facility and severity level. You can turn off syslog logging and you can turn on logging to an external file. You can also change the format what's logged to the external file. Read the man page for details.

    HTH

    Jim Lane
    #AIX-Forum


  • 11.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Thu December 20, 2007 10:08 PM

    Originally posted by: apple08


    Thanks Jim. Your explaination is very great. I would like to ask questions as I don't know how to do it.
    Jim
    It depends. By default sudo uses syslog with facility local2. To see anything you need to modify /etc/syslog.conf because local2 is disabled by default.
    Apple
    I tried to find the local2 inside the /etc/syslog.conf file. I would like to see how it disabled the thing?

    Jim
    However you can change all of this in the sudoers file. You can specify a different syslog facility and severity level. You can turn off syslog logging and you can turn on logging to an external file. You can also change the format what's logged to the external file. Read the man page for details.
    Apple
    1. which man page should i refer?
    1. man sudo
    Manual entry for sudo not found or not installed.
    1. man sudoers
    Manual entry for sudoers not found or not installed.
    1. man sudo
    Manual entry for sudo not found or not installed.

    2. how can I change this in the sudoers file?
    we have this entry in our sudo file:
    Defaults log_year, logfile=/var/log/sudo.local.log
    but when i check the directory path, it doesn't exist.

    Hope to hear from you.
    Thanks a bundle for the great explaination
    #AIX-Forum


  • 12.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Fri December 21, 2007 04:39 AM

    Originally posted by: hdkutz


    Hello apple08,
    set Environmnet right!
    Set the MANPATH Variable und you'll get information you desire.

    ls -al /opt/freeware/man
    export MANPATH=$MANPATH:/opt/freeware/man

    HTH,
    ku
    #AIX-Forum


  • 13.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Sun December 23, 2007 10:47 PM

    Originally posted by: apple08


    Yeahhh, my man sudo is working.
    but i don't have the sudo log yet,i only have this directory,/var/log. how can i create the sudo.local.log to capture the sudo.log

    Defaults log_year, logfile=/var/log/sudo.local.log
    would really appreciate your awaiting reply. Thank you.
    #AIX-Forum


  • 14.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Mon December 24, 2007 06:05 AM

    Originally posted by: hdkutz


    Did you touched the Logfile?
    1. touch /whereever/your/sudo/logfile/lives

    Cheers,
    ku
    #AIX-Forum


  • 15.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Tue December 25, 2007 07:36 PM

    Originally posted by: apple08


    Mr Ku,

    do i need to add command when i touch the file:
    touch /whereever/your/sudo/logfile/lives
    #AIX-Forum


  • 16.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Thu December 27, 2007 09:25 PM

    Originally posted by: apple08


    Dear AIX Gurus,
    My log is working. :)
    how can edit the sudo to enable sysadmin id to perform the mksysb.
    currently we have:
    Cmnd_Alias AIX_BACKUP = /usr/sbin/rmt, /usr/bin/mt, /usr/sbin/backup, /usr/sbin/
    restore
    how can add in a command in this entry to enable them to do mksysb.

    hope to hear from you.

    thanks a lot.
    #AIX-Forum


  • 17.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Wed January 02, 2008 04:41 AM

    Originally posted by: hdkutz


    Hmm,
    something like this?
    <snip>
    Cmnd_Alias AIX_BACKUP = /usr/sbin/rmt, /usr/bin/mt, /usr/sbin/backup, /usr/sbin/restore, /usr/bin/mksysb *
    <snip>

    Notice the <STAR> at the end of the above line. mksysb needs arguments. :-)
    Cheers,
    ku
    #AIX-Forum


  • 18.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Wed January 16, 2008 08:48 PM

    Originally posted by: apple08


    Dear AIX Gurus,
    Thank you
    The previous installation was
    successfully done using sudo-1.6.7p5-3 installer. Thank you. I use visudo to edit the file and execute using $ sudo
    able to execute the command
    but in our older server, it's already installed sudo, but i'm not sure the version. i use sudoedit to edit the file, but when i try to execute the command, was not able to execute, the error is as per below:
    $ sudo topas
    ksh: sudo: not found.
    Hope to hear from you. Thank you
    #AIX-Forum


  • 19.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Wed January 16, 2008 09:23 PM

    Originally posted by: orphy


    Assuming that you have sudo in /usr/local/bin, try fixing your PATH.

    ls -l /usr/local/bin/sudo # to confirm it's there
    PATH=$PATH:/usr/local/bin
    export PATH
    sudo topas
    Orphy
    #AIX-Forum


  • 20.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Mon January 21, 2008 08:17 PM

    Originally posted by: apple08


    Dear AIX Admin,
    Thank you. It works, but whenever i log off, it prompt me with the same error:
    $ sudo topas
    ksh: sudo: not found.
    can i export the path permanently, so that i don't have to export each and every time. hope to hear from you. many thanks in advance
    #AIX-Forum


  • 21.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Mon January 21, 2008 08:41 PM

    Originally posted by: orphy


    Put it in your .profile.
    Orphy
    #AIX-Forum


  • 22.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Wed February 13, 2008 06:58 AM

    Originally posted by: apple08


    The respond from ibm wiki is very splendid. thanks to the all the experts here

    if we want to give rights so that the sudo can perform sudo smit, how can we give this?
    what command to put inside visudo?
    hope to hear from you
    #AIX-Forum


  • 23.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Wed February 13, 2008 09:08 AM

    Originally posted by: orphy


    You seem to have something very specific in mind here and the time you have spent on this is not brief at all. For what you wanted to do, have you looked into the AIX Roles feature to see if they fit your need? If so, this is a basic AIX feature and it could save you a lot of time. Search the Infocenter for more info.
    Orphy
    #AIX-Forum


  • 24.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Wed February 13, 2008 08:01 PM

    Originally posted by: apple08


    Dear Mr Orphy,
    Where can I find AIX Roles feature. it sound very interesting.hope to hear from you.

    thanks a lot
    #AIX-Forum


  • 25.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Wed February 13, 2008 09:40 PM

    Originally posted by: orphy


    1. http://www.google.com/
    2. type "AIX infocenter"
    3. select the first one which get you to

    http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp

    Search with "roles" and you want to read about AIX administrative roles.
    Orphy
    #AIX-Forum


  • 26.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Tue June 14, 2011 08:54 AM

    Originally posted by: kishoraix


    hi orphy

    i need to give that sudo path as global for all users.
    kindly suggest me on which file and what we need to make changes..

    Regard's
    kishor babu
    #AIX-Forum


  • 27.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Wed June 15, 2011 03:01 AM

    Originally posted by: kishoraix


    > kishoraix wrote:
    > hi orphy
    >
    > i need to give that sudo path as global for all users.
    > kindly suggest me on which file and what we need to make changes..
    >
    > Regard's
    > kishor babu

    hi orphy

    i need to give that sudo path as global for all users.
    kindly suggest me on which file and what we need to make changes..

    Regard's
    kishor babu
    hi orphy

    when i am trying to connect root throw username the following error has come

    kishor@testserver:/#sudo su -
    ksh: sudo: not found.
    when i have given following commends
    ouput will be...as follows

    root@testserver:/#whereis sudo
    sudo:
    root@testserver:/#which sudo
    /usr/local/bin/sudo
    This is my problem can u suggest me...
    what i need to do..
    it's urgent in my environment...
    Could u plz help me..
    #AIX-Forum


  • 28.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Fri June 10, 2011 03:02 AM

    Originally posted by: kishoraix


    can u suggest where we need to enter following path
    cd /etc/profile
    or
    cd /etc/environment

    "PATH=$PATH:/usr/local/bin
    export PATH
    sudo topas"

    i have entered cd/etc/profile
    but it's throw following error

    kishor@testserver:/home/kishor#sudo su-
    ksh: sudo: not found.
    #AIX-Forum


  • 29.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Tue June 14, 2011 04:03 AM

    Originally posted by: kishoraix


    root@testserver:/#sudo -V
    Sudo version 1.8.1p2
    Configure args: --enable-zlib=builtin --prefix=/usr/local --with-insults=disabled --with-logging=syslog --with-logfac=auth --with-editor=/usr/bin/vim:/usr/bin/vi:/bin/vi --with-env-editor
    sudo: /etc/sudoers is mode 0644, should be 0440
    sudo: no valid sudoers sources found, quitting
    sudo: unable to initialize policy plugin

    what i need to do could plz suggest me.,,,
    #AIX-Forum


  • 30.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Tue June 14, 2011 04:21 AM

    Originally posted by: tony.evans


    I suggest you read the output from the command and fix the first things it tells you is wrong.
    #AIX-Forum


  • 31.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Tue June 14, 2011 05:59 AM
      |   view attached

    Originally posted by: kishoraix


    i have install sudo correctly but i don't know how to configure in aix 5.3
    here i am sending my sudoers file.. can u suggest me.what entry is i need to write in sudoers..file...
    Once find out the attachment..
    #AIX-Forum

    Attachment(s)



  • 32.  Re: SUDO Configuration get warnings. Please help. Hope to hear from you.

    Posted Wed June 15, 2011 06:47 AM

    Originally posted by: kishoraix


    hi Gurus

    i need to global path in aix..
    could u plz tell me

    Regard's
    kishor
    #AIX-Forum