02-08-2005
How to hide password on Linux?
Hi falks,
I have the following ksh code:
echo "Enter VS Admin password:"
oldstty=`stty -g`
stty -echo intr '$-'
read password
stty $oldstty
echo
This code ask from a user to enter his password. The OS suppose to hide the entering of the password.
This code works fine On Sun Solaris and HP but fails on Linux.
On Linux,i get the following error message:
Enter VS Admin password:
stty: invalid integer argument `$-'
Try `stty --help' for more information.
Does anyone know how it works on Linux?
Thanks in advance,
Nir
10 More Discussions You Might Find Interesting
1. Programming
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)
Discussion started by: ivancheung
2 Replies
2. Shell Programming and Scripting
All,
In my script I am calling another script.. in that script I need to enter a password. Problem is that everyone is able to see the password when I enter that. Is there any way that when i enter that password it should not display or may look like *******.
Or if there any other way that I... (1 Reply)
Discussion started by: arpitk
1 Replies
3. Shell Programming and Scripting
Hi,
I am writing a UNIX .ksh script and need to send the login password of the login id that is executing the script to a command that I am executing in the script. I don't want that password to be seen by anyone except whoever is executing the script.
Does anyone know how I can accomplish... (6 Replies)
Discussion started by: samd
6 Replies
4. Shell Programming and Scripting
I am writting script like
echo "ENTER USERNAME: \c "
read uName
echo "ENTER PASSWORD: \c"
read pwd
In this it is shwng password on screen, I want to hide it, how can I do that (5 Replies)
Discussion started by: scorp_rahul23
5 Replies
5. Shell Programming and Scripting
I have a properties file that contains passwords, need to hide the passwords before the properties file can be distributed.
Input file:
prop1=1
prop2=2
password=123456 this is a test pw
prop3=3
password=789abc this is a prod pw
My sed command is:
sed 's/password=.*/password=xxx/g' <... (3 Replies)
Discussion started by: oakwoodman
3 Replies
6. UNIX for Dummies Questions & Answers
hi all,
i run sqlplus command on unix(HP-UX)
like "sqlplus username/password@serverA @deneme.sql"
but when someone run "ps -ef | grep sqlplus", it can see my username and password :(
How can i hide username and password.
thanx. (1 Reply)
Discussion started by: temhem
1 Replies
7. Shell Programming and Scripting
Dear folks,
The title of my thread says mostly all of what I want to do. Basically I want to auto-ssh to a remote host, and run a program on it (VLC is just an example). I wrote a script which calls xterm and then runs expect on it. The code is as follow
#!/bin/bash
export PASS="xxxxxxx"... (22 Replies)
Discussion started by: dukevn
22 Replies
8. Shell Programming and Scripting
Hi
I have following problem Im writing a script (in bash ) , where need to be written login & passwd for databas client .
Its need to in following form login passwd@dbhostname .
The problem is so anybody can read it so the passwd & login are visible and thats not very safety .
Can... (8 Replies)
Discussion started by: kvok
8 Replies
9. UNIX for Dummies Questions & Answers
Hi there,
I found out a very strange behavior.
If I call ssh, my password will be invisible when I'm prompted to type it:
santiago@cassiopee:~$ ssh titan.caoba.fr "echo connected"
santiago@titan.caoba.fr's password: <--- password is hidden when typed
connected
santiago@cassiopee:~$ If I... (5 Replies)
Discussion started by: chebarbudo
5 Replies
10. Shell Programming and Scripting
i have a shell script which calls a java program with username and password arguments.
#!/bin/ksh
#set some classpaths here
#finally run the command
java com.test -u $U -p $P
Now when i run it, the password shows up in the list of processes. I am not the admin on the server so cant... (3 Replies)
Discussion started by: ariesb2b
3 Replies
LEARN ABOUT HPUX
vparadmin
vparadmin(1M) vparadmin(1M)
NAME
vparadmin - modifies attributes for the virtual partition flexible administrative capability
SYNOPSIS
vp_name] | |
DESCRIPTION
The command is used to add or delete a Designated-Admin vPar. It can also be used to change the virtual partition flexible administrative
password.
Options are valid when the virtual partition flexible administrative capability is enabled.
Options
recognizes the following command line options and arguments. The options are mutually exclusive.
Adds the virtual partition
to the Designated-Admin vPar list in a secure virtual partition environment. It will prompt for the existing virtual parti-
tion flexible administrative password before allowing the addition.
Deletes the virtual partition
from the Designated-Admin vPar list. It will prompt for the existing virtual partition flexible administrative password
before allowing the deletion.
Changes the virtual partition flexible administrative password.
It will prompt for the old password for validation.
Displays the Designated-Admin vPar list.
If no arguments are supplied, indicates whether the virtual partition flexible administrative capability is enabled or disabled.
SECURITY RESTRICTIONS
This command is restricted to processes owned by a superuser.
RETURN VALUE
The command exits with one of the following values:
Successful completion.
One or more error conditions occurred.
EXAMPLES
Use vparadmin without any options:
The virtual partition fle xible administrative capability is disabled.
Add the name of the virtual partition called to the Designated-Admin vPar list:
---------- Designated-Admin virtual partitions ----------
Oslo
To change the virtual partition flexible administrative password:
Old password:
New password:
Re-enter new password:
vPar flexible administrative password successfully changed.
ERRORS
displays error messages on standard error for any of the following conditions:
o An invalid option is specified.
o An invalid value is specified for an option or a value is omitted.
o does not exist in the monitor database.
o One or more options are specified more than once.
AUTHOR
was developed by the Hewlett-Packard Company.
SEE ALSO
vparboot(1M), vparcreate(1M), vparmodify(1M), vparremove(1M), vparreset(1M), vparresources(5), vparstatus(1M), vpmon(1M).
vparadmin(1M)