Sponsored Content
Top Forums Shell Programming and Scripting Encrypt password but use * when typing password Post 302535333 by Corona688 on Thursday 30th of June 2011 12:02:28 PM
Old 06-30-2011
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.

Code:
$ printf "hello\n"
hello
$ printf "hello"
hello$

 

10 More Discussions You Might Find Interesting

1. Programming

hide password typing

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

encrypt and decrypt password

how do i encrypt and decrypt a password (2 Replies)
Discussion started by: sanwish
2 Replies

3. UNIX and Linux Applications

How to encrypt oracle password table ?

Hi Oracle & Unix expert, Could you tell me how to encrypt oracle table ? Thanks. (1 Reply)
Discussion started by: olaris
1 Replies

4. Shell Programming and Scripting

cronjob on a remote ssh without typing password

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)
Discussion started by: chebarbudo
1 Replies

5. Shell Programming and Scripting

Encrypt and save password

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)
Discussion started by: cheerful
1 Replies

6. Shell Programming and Scripting

How to Encrypt password

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)
Discussion started by: DSDexter
1 Replies

7. AIX

SSH session closes after typing correct password

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)
Discussion started by: bocha
6 Replies

8. Shell Programming and Scripting

Encrypt DB password in Script

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)
Discussion started by: chetan.c
6 Replies

9. Shell Programming and Scripting

Encrypt Plaintext Password?

How do I encrypt a plaintext password that I need hardcoded in a bash script? (3 Replies)
Discussion started by: wyclef
3 Replies

10. UNIX for Beginners Questions & Answers

Encrypt and Decrypt a File with Password

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)
Discussion started by: eskay
3 Replies
newgrp(1)						      General Commands Manual							 newgrp(1)

NAME
newgrp - switch to a new group SYNOPSIS
[group] DESCRIPTION
The command changes your group ID without changing your user ID and replaces your current shell with a new one. If you specify group, the change is successful if group exists and either your user ID is a member of the new group, or group has a pass- word and you can supply it from the terminal. If you omit group, changes to the group specified in your entry in the password file, Whether the group is changed successfully or not, or the new group is the same as the old one or not, proceeds to replace your current shell with the one specified in the shell field of your password file entry. If that field is empty, uses the POSIX shell, (see sh- posix(1)). If you specify (hyphen) as the first argument, the new shell starts up as if you had just logged in. If you omit the new shell starts up as if you had invoked it as a subshell. You remain logged in and the current directory is unchanged, but calculations of access permissions to files are performed with respect to the new real and effective group IDs. Exported variables retain their values and are passed to the new shell. All unexported variables are deleted, but the new shell may reset them to default values. Since the current process is replaced when the new shell is started, exiting from the new shell has the same effect as exiting from the shell in which was executed. EXTERNAL INFLUENCES
International Code Set Support Characters from the 7-bit USASCII code set are supported in group names (see ascii(5)). DIAGNOSTICS
The command issues the following error messages: Your user ID does not qualify as a group member. The group name does not exist in If a password is required, it must come from a terminal. Standard input is not a terminal file, causing the new shell to fail. EXAMPLES
To change from your current group to group without executing the login routines: To change from your current group to group and execute the login routines: WARNINGS
There is no convenient way to enter a password into The use of group passwords is not recommended because, by their very nature, they encourage poor security practices. Group passwords may be eliminated in future HP-UX releases. If the specified group to has multiple inconsistent entries (i.e. the group id or/and password are different) in the group database, will consider the group id and password of the first matched group entry as the correct group id and password for the group. FILES
System group file System password file SEE ALSO
csh(1), ksh(1), login(1), sh-posix(1), group(4), passwd(4), environ(5). STANDARDS CONFORMANCE
newgrp(1)
All times are GMT -4. The time now is 01:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy