This is why you use visudo, not sudo vi to edit /etc/sudoers.
There was probably a warning in the file telling you such, like there is in mine:
Now you will need real root access to fix it.
sudo may have had security features preventing you from raw editing it anyway - it might not work again, even fixed, until you run visudo and re-save from root.
i have root access like i login with user1 and then sudo to root.
How do you login as real-root access user? Can you please elaborate ?
Experts,
I tried to make my cshell script interactive by asking the user for password and trying to read the input using the "read" command. I have been unsuccessful so far. Do you have any idea ?
Thanks
Jim (2 Replies)
Can i run the SU command in a non interactive mode. What i want to do is to pass the username and the password as commandline or batch parameters. Please let me if its possible and how to pass them. A sample file will be appreciated.
Thanks, (6 Replies)
Hi,
I am new to shell scripting.I have written a very simple shell scipt that asks for the username and password on executing. i.e
echo "Enter username :"
read usrname;
echol "Enter password :";
read passwd;
echo usrname;
echo passwd;
but now I want to make it automatic , such... (2 Replies)
I have a strange situation. I'm running a shell script containing several data uploads (using Oracle sqlloader utility). This script is being run on a Red Hat server.
I tried to run it in background:
$ nohup upload.sh &
This script uploads some thousands files. After several hours I... (0 Replies)
Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines.
It then prompts for deletion of the file.
If user supplies arguments with the script , then it works on those files... (8 Replies)
Hello,
Script command helps to save command output to file. (Redicection doesn't work in this case).
Besides interactive shell 'recording', Linux script command has "-c" option which allows to record output of some non-interactive command.
The problem is that AIX script command variant... (6 Replies)
I have a file with stats for different month, I use the cat and grep combination to search for different month.
cat <file> | grep "April"
cat <file> | grep "May"
cat <file> | grep "June"
etc.
How do you make this command interactive. So that I can give the values for the search. Thanks... (7 Replies)
Hi All,
I am writing a script(Auto_Installation.sh) which is calling one another script (./update_manager /spare/install/HO7/PME_Response_file.txt)
Now the issue is result of (./update_manager /spare/install/HO7/PME_Response_file.txt) script is
##########################################... (6 Replies)
Hello experts,
I have a to write script for monitoring, the script would use a command and I plan to write the script as follows
while true
do
command -arg
sleep 2
clear
done
The output would be set up on a screen for monitoring. However the issue is that the command used in... (2 Replies)
Inorder to make the pkgadd non-interactive i tried couple of things but both failed.
1.
sudo pkgadd -n /u/mont/admin -d /u/mont/dbprd.pkg
pkgadd: ERROR: no packages were found in </var/spool/pkg>
2.
yes all | sudo pkgadd -a /u/mont/admin -d /u/mont/dbprd.pkg
... (0 Replies)