Sudo command prompt for a password


 
Thread Tools Search this Thread
Operating Systems AIX Sudo command prompt for a password
# 1  
Old 03-13-2018
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:
Mod Comment Please use CODE tags as required by forum rules!
Sudo command prompt for a password-sudo_prompt_passwordjpg

Last edited by RudiC; 03-13-2018 at 01:50 PM.. Reason: Added CODE tags.
# 2  
Old 03-13-2018
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 01:59 PM..
# 3  
Old 03-15-2018
Also, make sure you're using visudo instead of trying to edit the config file directly.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Not getting command prompt after entering the login password

Hi All, I am not able to get the command prompt after entering the login password on solaris server Only access is through console. Server type : sun4u sparc SUNW,Netra-T12 bsnl-north-in > ssh 10.147.17.207 jtoin Connecting to 10.147.17.207 as user jtoin Password: Last login: Wed Mar 5... (1 Reply)
Discussion started by: sandeep_kmehra
1 Replies

2. Red Hat

Sudo Password Prompt over SSH

I am not sure what I am missing here. I have the following identical entry in /etc/sudoers on multiple Red Hat 6.4 servers. icinga ALL=NOPASSWD:/usr/bin/yum --security --exclude\="kernel*" check-update On one server when I enter the command over SSH as follows it works fine. ssh -t -q... (1 Reply)
Discussion started by: scotbuff
1 Replies

3. UNIX for Dummies Questions & Answers

Sudo -s without password prompt

hi, i have a requirement where i need to sudo to another user in the shell script.suppose consider user A and B, first user A calls a shell script and then i need to sudo to user B which executes another shell script inside the earlier one. also this needs to be automated like while sudo'ing to... (3 Replies)
Discussion started by: krk
3 Replies

4. Shell Programming and Scripting

ssh foo.com sudo command - Prompts for sudo password as visible text. Help?

I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this: #!/bin/bash rsync /path/on/local/machine/ foo.com:path/on/remote/machine/ ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies

5. OS X (Apple)

Bash script prompt for sudo password?

I'm making a script that will be a double clickable .command file and I need it to prompt for the users admin password. So far I have: if ]; then sudo -p "Please enter your admin password: " date 2>/dev/null 1>&2 if ; then echo "You entered an invalid password... (2 Replies)
Discussion started by: PatGmac
2 Replies

6. Shell Programming and Scripting

sudo, use in script without prompt for password

I need to create an automated script where I have to use sudo to switch to multiple user so the script stops and prompts for password, Is there a way I can provide the password in same command only? Remember that, I cannot disable the password settings of sudo as I dont have rights. (4 Replies)
Discussion started by: gauravgrover50
4 Replies

7. UNIX for Advanced & Expert Users

su command without password prompt to non-root account

Hello. I searched the internet for answers and don't seem to find any for about a day now. My problem. I want to su to a non-root account non-interactively, e.g. if I want to temporarily become prdusr, I want to su prdusr without keying prdusr's password every time. What I want is... (10 Replies)
Discussion started by: royale-sojin
10 Replies

8. Shell Programming and Scripting

sudo command with password

Hello everybody, Say I forgot my root password (shit happens, no?) and I'd like to brutally try 100 possibilities to delete a file using sudo. How can I make a script that tries all the passwords? The following doesn't work. Do you have a clue? foo:~$ cat test sudo rm dummy <<< 'password' echo... (1 Reply)
Discussion started by: chebarbudo
1 Replies

9. UNIX for Dummies Questions & Answers

sudo in OS X shell script without password prompt??

I've written a shell script to alter a particular preference file on OS X (10.3.9), which works fine (tested by running the script from the terminal sat in front of the box). Problem is, I now have to run this script remotely across a number of machines via remote desktop, so where I've used the... (1 Reply)
Discussion started by: Brad_GNET
1 Replies

10. Shell Programming and Scripting

any way to use SU command without prompt for password

Hi, First i want to tell you i am not a administrator and everytime to run a sqlscritpt i have to login as SU in a particular account to connect to sqlplus.. I want to write a script which can make me free by doin this .. since i am having the permission for SU i want to know if i can SUDO... (7 Replies)
Discussion started by: myelvis
7 Replies
Login or Register to Ask a Question