Looking for a way in a shell script to validate the password for for root on an (AIX) matches a standardized plain text password. This query is similar to another one on this site. I have access to root and can compile a c Program if needed.
I have been abel to find standard libraries to do this for HP-UX and Linux. Now I am working on AIX and I have been hitting nothing but road blocks.
I Have created a shell script as given below.This script will login to a remote server as a normal user then switch to root user for creating a directory.The script is as given below.
ssh -t qbadmin@10.3.2.0 '
su root -c "
echo \"Give Directory name :\";
read dir;
mkdir \$dir;
";
'
Here the script will ask Password for normal user first.Then again it will ask for root Passwor
After run my script, i am giving my password as input to script.
First script validates if my given password is correct and then script should start remaining process
In my script.
echo -n "Enter Password: "
stty -echo
read passwd
stty echo
#Here i want to evaluate $passwd having corresponding user's system password or not
# <Then some process start>
I am on Maverick. In my user's crontab I run a backup script, dbbackup.sh. But it won't run because the sudo password is requested. Why is that? The script is owned by my user account and is executable. This script used to run in lucid. Do I not have permission to run a shell script?
I'm trying to write a shell script to transfer files to a remote windows machine which is running a ultra simple sftp server .
So i don't have the option of using public key authentication.
From the Linux end its a stripped down version for non intel platform , So if i want to use "expect" i cant install expect/tcl/tk.
Shell Scipt: temp.sh
<code>
su - <$username>
expect pass.exp
<code>
Expect script: pass.exp
#!/usr/bin/expect -f
# Login
#######################
expect "Password: " send "<$password>\r"
it comes up with Password: but doesnt take password passed throguh file.
Hello,
I have a requirement to shut down and start up my application on different environments (Dev, QA and Prod).
I have around 24 servers. I have to login to each server manually for shutinng down the application.
I wrote a shell command on each server and I am invoking those shell scripts from one server and shutting down.
Here is the issue now.
Hello,
I have a python script (not created by me), let's call it myscript, which I call with several parameters. If I don't provide the --password parameter, the script will ask the user to input the password.
So I run the script like this:
Code:
/wherever/myscript --username=whoever /some/other/path/parameter
That makes it ask for a password and wait for user input.
Hi All,
Currently our application is running on the server having AIX 5.3 OS.
What we intend to do is to run a shell script owned by another user and needs to be run as that particular user.
I was trying to create a shell script using the su command before running the actual script (which will be executed from the new script). The su command always prompt for a password.