Sponsored Content
Top Forums Shell Programming and Scripting Bash scripting mask password from ps Post 303023643 by MadeInGermany on Thursday 20th of September 2018 12:17:43 PM
Old 09-20-2018
The prefixed PW= is a temporary environment assignment in the invoking shell, and not part of the command arguments.
Comparable to
Code:
export PW=top_secret; ./script ... ; unexport PW

Access via ps ewww or pargs -e or /proc/pid/environ is denied for other (non-root-)users.
 

10 More Discussions You Might Find Interesting

1. Programming

password mask in C

Hi, Could any one help me to write a C program for password mask with ******. I mean whatever word i will type that will show on the screen as ***** and should store the correct value in a variable. Thanks in advance Krishna (5 Replies)
Discussion started by: krishna
5 Replies

2. Shell Programming and Scripting

scripting password prompts

Hi there Probably a really simple question but I am writing an install script and at certain stages of the install (ie creating a table in mysql) the system prompts for you to enter a password, I was wondering, how do I script this input so that the install doesnt keep stopping for manual... (3 Replies)
Discussion started by: hcclnoodles
3 Replies

3. Shell Programming and Scripting

scp scripting without asking password

I like to copy a file from one server server1 from path path1 to another server server2 to path path2. User logging in both the servers are same say user1 I tried to use ssh to generate public/private key pairs and then copy without prompting for password. These are the steps i followed ... (5 Replies)
Discussion started by: jwala
5 Replies

4. Shell Programming and Scripting

Scripting password changes.

Hello, I am looking for a way to login to multiple machines and do things such as create users, reset root passwords etc non interactively. The problem with the passwords is that all machines use ssh, dont allow root login, require to login as a normal user, su to root then change the root... (1 Reply)
Discussion started by: Actuator
1 Replies

5. Shell Programming and Scripting

Scripting help/advise on hiding/masking username/password

Hi, I currently have a UNIX script with a function that uses a username and password to connect to the database, retrieve some information and then exit. At the moment, am getting the username and password from a hidden plain text file and permission set to -r--------, i.e. read only to who... (1 Reply)
Discussion started by: newbie_01
1 Replies

6. UNIX for Dummies Questions & Answers

how to mask the password ?

Hi All, i am executing peoplesoft sqr command from unix prompt which has the unix id/password as parameter along with other parameters. i want to show whole command in log file but want to mask the id/password field. this command i am executing in shell script. Please suggest.. >sqr sqrname... (2 Replies)
Discussion started by: avi.coep
2 Replies

7. Shell Programming and Scripting

Scripting password prompt for restarting Jboss application

Hi When I do on console a stop, the script prompts for password > stop_idm_suite.sh Suite system password:Here experct of the shell script stop_idm_suite.sh DoIt() { # prompt System password echo "" ${BMC_JAVA_HOME}/java -Didm.suite.home=${BMC_IDM_SUITE_HOME} -classpath... (1 Reply)
Discussion started by: slashdotweenie
1 Replies

8. Red Hat

Samba create mask and dir mask on RHEL 4.8

Hi Experts, I'm using samba -3.6.1 on Red Hat Enterprise Linux ES release 4 (Nahant Update 8) ,all seems ok. The issue im facing is as follows. When ever a user creates a file via windows explorer the permissions assgined to the file are as follows -rw-rwxr--+ 1 tom group2 0 Mar 9... (1 Reply)
Discussion started by: maverick_here
1 Replies

9. UNIX for Dummies Questions & Answers

What is mask and effective right mask in setfacl?

Hi Guys, can someone explain what is mask and effective right mask in setfacl and getfacl command with example, unable to get it. (3 Replies)
Discussion started by: Jcpratap
3 Replies

10. Shell Programming and Scripting

Make a password protected bash script resist/refuse “bash -x” when the password is given

I want to give my long scripts to customer. The customer must not be able to read the scripts even if he has the password. The following command locks and unlocks the script but the set +x is simply ignored. The code: read -p 'Script: ' S && C=$S.crypt H='eval "$((dd if=$0 bs=1 skip=//|gpg... (7 Replies)
Discussion started by: frad
7 Replies
pargs(1)                                                           User Commands                                                          pargs(1)

NAME
pargs - print process arguments, environment variables, or auxiliary vector SYNOPSIS
pargs [-aceFlx] [pid | core] ... DESCRIPTION
The pargs utility examines a target process or process core file and prints arguments, environment variables and values, or the process auxiliary vector. pargs outputs unprintable characters as escaped octal in the format xxx, unless the character is one of the characters specified in the "Escape Sequences" section of formats(5), in which case the character is printed as specified in that section. pargs attempts to be sensitive to the locale of the target process. If the target process and the pargs process do not share a common char- acter encoding, pargs attempts to employ the iconv(3C) facility to generate a printable version of the extracted strings. In the event that such a conversion is impossible, strings are displayed as 7-bit ASCII. OPTIONS
The following options are supported: -a Prints process arguments as contained in argv[] (default). -c Treats strings in the target process as though they were encoded in 7-bit ASCII, regardless of the locale of the target. The use of iconv(3C) is suppressed. -e Prints process environment variables and values as pointed at by the _environ symbol or by pr_envp in /proc/pid/psinfo. -F Force. Grabs the target process even if another process has control. -l Displays the arguments as a single command line. The command line is printed in a manner suitable for interpretation by /bin/sh. If the arguments contain unprintable characters, or if the target process is in a different locale, a warning message is dis- played. The resulting command line may not be interpreted correctly by /bin/sh. -x Prints process auxiliary vector. OPERANDS
The following operands are supported: pid Process ID list. core Process core file. EXIT STATUS
The following exit values are returned: 0 Successful operation. non-zero An error has occurred (such as no such process, permission denied, or invalid option). FILES
/proc/pid/* Process information and control files. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
proc(1), iconv(3C), proc(4), ascii(5), attributes(5), environ(5), formats(5) SunOS 5.10 13 Apr 2004 pargs(1)
All times are GMT -4. The time now is 11:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy