Hidden passwords


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Hidden passwords
# 1  
Old 09-21-2005
Hidden passwords

Upon executing a script that sets the value to a password variable, is there a way to hide a password value from being detected in standard out?
# 2  
Old 09-21-2005
If you need to authenticate using name/passwd use those credentials within a here-document.

A quick googling gave these

Hiding the password

There is an interesting solution described in this link

How can I hide passwords in a shell script?

And finally, Can one prevent passwords from appearing in the system process table?

vino
# 3  
Old 09-21-2005
The following function demostrate how to ask from user to enter a password.
The password is invisable:

Code:
check_schema_password()
{
echo "Please enter $SCHEMA_NAME password (default $SCHEMA_NAME):"
tput invis
read answer
tput sgr0
if [[ $answer = '' ]] ; then
  export SCHEMA_PASS=${SCHEMA_NAME}
else
  export SCHEMA_PASS=${answer}
fi
}

Nir
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rsync - how to copy hidden folder or hidden files when using full path

Hello. I use this command : rsync -av --include=".*" --dry-run "$A_FULL_PATH_S" "$A_FULL_PATH_D"The data comes from the output of a find command. And no full source directories are in use, only some files. Source example... (2 Replies)
Discussion started by: jcdole
2 Replies

2. UNIX for Dummies Questions & Answers

List all directories hidden or not hidden

I want to list all directories hidden or not hidden. ls -ld */ => shows only not hidden directories so i guess the answer would be to add the a option to show all files ls -lad */ => not working :confused: ls -la | grep "^d" => works But I would like to know why I can't use ls -lad... (4 Replies)
Discussion started by: servus
4 Replies

3. UNIX for Advanced & Expert Users

When did UNIX start using encrypted passwords, and not displaying passwords when you type them in?

I've been using various versions of UNIX and Linux since 1993, and I've never run across one that showed your password as you type it in when you log in, or one that stored passwords in plain text rather than encrypted. I'm writing a script for work for a security audit, and two of the... (5 Replies)
Discussion started by: Anne Neville
5 Replies

4. UNIX for Dummies Questions & Answers

hidden files

I usually use ls -al | awk '{sum = sum + $5} END {print sum}' to sum the size of all files in a directory. However this command includes the hidden files. Is there a command to just add up all the files/sub-directories excluding the hidden files (begins with . and ..) I wanted to check the... (10 Replies)
Discussion started by: lhareigh890
10 Replies

5. Shell Programming and Scripting

passwords

Dear all, I need to automate/script a user password change process. I'm helpless cannot use expect since it's not installed and cannot install it either. Do i have an alternative. I can store the password in a file and that would be the password that would be set to all the users. If not i don't... (1 Reply)
Discussion started by: earlysame55
1 Replies

6. Shell Programming and Scripting

Finding Hidden files and protecting the folder containing hidden files from deletion

Hi. I have a script which is deleting files with a particular extension and older than 45 days.The code is: find <path> -name "<filename_pattern>" -mtime +45 -exec rm {} \; But the problem is that some important files are also getting deleted.To prevent this I have decide to make a dummy... (4 Replies)
Discussion started by: pochaw
4 Replies

7. Shell Programming and Scripting

hidden output

Hello All, I have a shell script, which is login user to database, prompting to enter username, password and database instance. I would like to hide password. Can someone tell me how to do that (if it is possible), so script's output could look something like this: %dblogin.ksh Please, Enter... (3 Replies)
Discussion started by: slavam
3 Replies

8. UNIX for Dummies Questions & Answers

Passwords

I am running unix 11.xxx....How do you change a user password. The previous vs was passwd at the command prompt. This no longer works. Thanks for the help (3 Replies)
Discussion started by: turner.rd
3 Replies
Login or Register to Ask a Question