Unix/Linux Go Back    


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

Sudo command prompt for a password

AIX


Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 03-13-2018   -   Original Discussion by wtolentino
wtolentino's Unix or Linux Image
wtolentino wtolentino is offline
Registered User
 
Join Date: Oct 2005
Last Activity: 13 March 2018, 12:24 PM EDT
Posts: 57
Thanks: 11
Thanked 0 Times in 0 Posts
Sudo command prompt for a password

in the /etc/sudoer file this line was added:


Code:
wtolentino ALL=(ORACLE) NOPASSWD: /bin/chmod

when i tried to run this command


Code:
sudo -u oracle /bin/chmod 775 /appshared/applications/lpa/executables/chrpt001.rep

it prompts me for a password

for example:


Code:
$ pwd
/appshared/applications/lpa
$ ls -l
total 48
drwxrwxr-x    2 wtolenti staff          4096 Mar 02 12:46 doc
drwxrwxrwx    2 wtolenti staff         16384 Mar 13 10:11 executables
drwxrwxr-x    5 wtolenti staff          4096 Feb 16 08:37 source
$ cd executables
$ ls -l chrpt001.rep
-rw-r--r--    1 oracle   oinstall      98304 Mar 13 10:11 chrpt001.rep
$ sudo -u oracle /bin/chmod 775 /appshared/applications/lpa/executables/chrpt001.rep
Password:

the file is chrpt001.rdf is owned by oracle and i am attempting to change the permission using the sudo command.

please advise.

thank you.


Moderator's Comments:
Sudo command prompt for a password Please use CODE tags as required by forum rules!
Attached Thumbnails
Sudo command prompt for a password-sudo_prompt_password-jpg  

Last edited by RudiC; 03-13-2018 at 12:50 PM.. Reason: Added CODE tags.
Sponsored Links
    #2  
Old Unix and Linux 03-13-2018   -   Original Discussion by wtolentino
RudiC's Unix or Linux Image
RudiC RudiC is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 22 April 2018, 7:58 AM EDT
Location: Aachen, Germany
Posts: 12,505
Thanks: 401
Thanked 3,877 Times in 3,564 Posts
Shouldn't that be /etc/sudoers ? And, unless the "Runas_Spec" ORACLE is a "User_Alias" for oracle, shouldn't it be lower case?

Last edited by RudiC; 03-13-2018 at 12:59 PM..
Sponsored Links
    #3  
Old Unix and Linux 03-15-2018   -   Original Discussion by wtolentino
kah00na's Unix or Linux Image
kah00na kah00na is offline
Registered User
 
Join Date: Jul 2007
Last Activity: 15 March 2018, 11:37 AM EDT
Location: Kansas
Posts: 300
Thanks: 21
Thanked 28 Times in 21 Posts
Also, make sure you're using visudo instead of trying to edit the config file directly.
Sponsored Links
Reply

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 Password Prompt over SSH scotbuff Red Hat 1 09-18-2013 11:49 AM
Sudo -s without password prompt krk UNIX for Dummies Questions & Answers 3 01-04-2013 08:57 PM
Bash script prompt for sudo password? PatGmac OS X (Apple) 2 05-01-2009 04:05 PM
sudo, use in script without prompt for password gauravgrover50 Shell Programming and Scripting 4 04-25-2009 08:26 AM
sudo in OS X shell script without password prompt?? Brad_GNET UNIX for Dummies Questions & Answers 1 07-29-2005 06:36 PM



All times are GMT -4. The time now is 08:45 AM.