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

👤 Login to reply
Thread Tools Search this Thread Display Modes
Old 03-13-2018
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:
wtolentino ALL=(ORACLE) NOPASSWD: /bin/chmod

when i tried to run this command
sudo -u oracle /bin/chmod 775 /appshared/applications/lpa/executables/chrpt001.rep

it prompts me for a password

for example:
$ pwd
$ 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

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
Old 03-13-2018
RudiC RudiC is offline Forum Staff  
Join Date: Jul 2012
Last Activity: 18 July 2018, 4:23 AM EDT
Location: Aachen, Germany
Posts: 13,069
Thanks: 449
Thanked 4,013 Times in 3,690 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
Old 03-15-2018
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
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 06:58 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password

Not a Forum Member?
Forgot Password?