I came across the following script for encrypting the password in this forum
I copied the script and executed it. I executed in RHEL. But this script outputs as given below:
I was expecting I should get something like this
password: ********
meaning whatever the password I type it should be in asterix. But this script keeps on moving down when I press a single character.
Your script worked for me on Solaris exactly as copied:
the \c means suppress the newline after printing the string.
I would put the escape sequence inside the quotes though so you don't need to worry about escaping the escape sequence which is where I think your issue is.
You should also use the trap command to reset the stty settings if the script is interrupted while running. Otherwise, your terminal session will be left hosed if you interrupt it while it is waiting for input.
the command in the single quotes will be executed if any of those signals are received. Some common signals:
SIGHUP (1) Hang up.
SIGINT (2) Interrupt from keyboard. Issued if you press ^C.
SIGQUIT (3) Quit from keyboard. Issued if you press ^D.
SIGFPE (8) Floating point exception.
SIGKILL (9) Kill signal.
SIGTERM (15) Terminate. Cause the program to quit gracefully
SIGCHLD (17) Child terminate.
Try echo -e, Linux won't understand \c without it. Or echo -n without the \c, to tell echo not to print a newline.
I really do think printf would be better, since newlines (or the lack of them) are a standard, portable feature of it -- should work the same on UNIX or Linux, shell builtin or external.
Hello,
I have few files on unix which are payroll related and I need them to encrypt with password so others wouldn't see the data. I use ETL tool and would like to know the unix command that does encryption/decryption to use in the ETL.
Thank you,
Sri (3 Replies)
Hi,
I have a SQL which i want to run through a shell script.
query_result=`/home/oracle/product/11.2.0/bin/sqlplus -S uname/pwd@DBNAME <<!
set heading off feedback off trimspool on
set pagesize 0
set linesize 9999
spool $PARAM_PATH/param_name.txt;
Select sysdate from dual;
spool off;... (6 Replies)
hi guys need some help. when ever i'm login ssh to aix server session always closed.
when trying t0 type wrong password the session still continues, but we tried the correct password it automatically ends.
what could be the problem to this
please see .profile details
... (6 Replies)
Hello,
I have a paramter file, In which I store all the user-ids and passwords for the project. So if a user just invokes the paramter file he has access to all the variables, which i have exported in the parmatere file.
Now if a user echo's the variable which stores the databse password.... (1 Reply)
Hello all,
I need to encrypt and save a password in a file and later decrypt to determine the original password string. Please suggest how can I use the linux commands or other approach to accomplish this.
Thanks for your help. (1 Reply)
Hi there,
How can I send a script to a remote ssh client.
1) I cannot connect through ftp
2) I just need to read a file on a remote server.
Here is what I do:
~$ ssh santiago@myserver.com
santiago@myserver.com's password:
santiago@myserver:~$ cat logfile
hello world
bonjour le monde
hola... (1 Reply)
I am doing a project in C program which requires to type in password in Unix terminal. Does anybody know how to shade or not output any words typed by user in the terminal?
I use the function scan() to read typing from user. Thanks in advance. (2 Replies)