Sponsored Content
Top Forums Shell Programming and Scripting Scripting help/advise on hiding/masking username/password Post 302403856 by rdcwayx on Monday 15th of March 2010 02:21:40 AM
Old 03-15-2010
sudo it.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Hiding password from ps

I'm calling a program with a command line arguement containing a password. while the process is running anyone on the system can ps -ef and see the password. Is there a way to prevent this from happening. example PROGRAM USERNAME/PASSWD I've also tried PROGRAM `cat passfile` ... (7 Replies)
Discussion started by: sudojo
7 Replies

2. UNIX for Dummies Questions & Answers

Hiding login/password in process!

Hello, I am trying to figure out away to hide a command from users when performing a ps check. I have a ksh that purges a table in a database. If I perform a >ps -eaf |grep ksh, I get the login id and password. I do not want other users seeing this. Is there a way to hide this. The login... (5 Replies)
Discussion started by: ctcuser
5 Replies

3. Shell Programming and Scripting

Hiding password for FTP in a script

Hi, I have a simple script to ftp from unix to a mainframe to get and put files. Currently I have the password setup in a VARS file and dereference the var in my script. Doing it this way allws me to change the password in only one place but it is still viewable for many people. Is there any... (6 Replies)
Discussion started by: Cass3
6 Replies

4. UNIX for Dummies Questions & Answers

Hiding Password

Hello. A bit of a puzzle here: I have a 3rd party executable, which requires the following parameters: parm1 = program_name, parm2=userid/password, parm3=additional flags. We tried passing password as a variable, but you can do grep, and see what the password actually is I found a bit... (2 Replies)
Discussion started by: Kishinevetz
2 Replies

5. UNIX for Dummies Questions & Answers

New Approach Hiding login password from ps -ef

Hello all , I looked up this site for solutions to hide login info from ps -ef | grep like using a seperate file and store the password in that especially for oracle sqlplus scripts. I just got this thought , But dont know how to implement this in UNIX. Is there a way to revoke access from... (17 Replies)
Discussion started by: simonsimon
17 Replies

6. Shell Programming and Scripting

Remote call not hiding password fields

Not sure on the description, but here is a quick rundown. I have 2 servers, we'll call them serverA serverB On serverB, I am calling a script that inside it has the following: ssh srvdsadm@serverB sudo -u dsadm /opt/apps/DataStage/scripts/autoDeploy.sh ${projName} ${subProjVar}... (1 Reply)
Discussion started by: cbo0485
1 Replies

7. Programming

Masking Password with *'s

So I've been working on this for some time now and can't seem to find the solution that works for me. I'm working in C/Unix. Basically, I want to take a user input and output something different. For example, I want to take a password and output *'s. In another instance, I want to take inputed... (35 Replies)
Discussion started by: bigdrock44
35 Replies

8. Shell Programming and Scripting

Masking Password from within a Bash Shell Script

Is there a way to mask the password inside of a script to minimize the impact of a comprimised server? So ssh -o "PasswordAuthentication no" -o "HostbasedAuthentication yes" -l testuser 192.168.3.1 "mysqldump --opt --all-databases -u root -pPassword| gzip" > $backup_dir/mysqldump.gz a... (2 Replies)
Discussion started by: metallica1973
2 Replies

9. Shell Programming and Scripting

Expect scripting telnet stop on bad username or password

I am trying to build and expect script to log into multiple aix boxes and change password. I need for the script to terminate if it cannot log into a server because the username or password is wrong. #!/usr/bin/expect set timeout 1 set host set user set password set uh "Unknown host" set... (3 Replies)
Discussion started by: leemalloy
3 Replies

10. Shell Programming and Scripting

Password hiding in UNIX

Hi guys, I use STTY command to make the password invisible. Now I need to write the password into another file pwd.txt, but in an invisible manner, something like ******. Another thing is to when I echo the content of pwd.txt I get the password I actually typed. Thanks guys. Help me out. (5 Replies)
Discussion started by: mohanalakshmi
5 Replies
DBX_CONNECT(3)								 1							    DBX_CONNECT(3)

dbx_connect - Open a connection/database

SYNOPSIS
object dbx_connect (mixed $module, string $host, string $database, string $username, string $password, [int $persistent]) DESCRIPTION
Opens a connection to a database. PARAMETERS
o $module - The $module parameter can be either a string or a constant, though the latter form is preferred. The possible values are given below, but keep in mind that they only work if the module is actually loaded. o DBX_MYSQL or "mysql" o DBX_ODBC or "odbc" o DBX_PGSQL or "pgsql" o DBX_MSSQL or "mssql" o DBX_FBSQL or "fbsql" o DBX_SYBASECT or "sybase_ct" o DBX_OCI8 or "oci8" o DBX_SQLITE or "sqlite" o $host - The SQL server host o $database - The database name o $username - The username o $password - The password o $persistent - The $persistent parameter can be set to DBX_PERSISTENT, if so, a persistent connection will be created. The $host, $database, $username and $password parameters are expected, but not always used depending on the connect functions for the abstracted module. RETURN VALUES
Returns an object on success, FALSE on error. If a connection has been made but the database could not be selected, the connection is closed and FALSE is returned. The returned $object has three properties: o database - It is the name of the currently selected database. o handle - It is a valid handle for the connected database, and as such it can be used in module-specific functions (if required). <?php $link = dbx_connect(DBX_MYSQL, "localhost", "db", "username", "password"); mysql_close($link->handle); // dbx_close($link) would be better here ?> o module - It is used internally by dbx only, and is actually the module number mentioned above. CHANGELOG
+--------+---------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------+ | 5.0.0 | | | | | | | Introduced DBX_SQLITE. | | | | | 4.3.0 | | | | | | | Introduced DBX_OCI8. | | | | | 4.2.0 | | | | | | | Introduced DBX_SYBASECT. | | | | | 4.1.0 | | | | | | | Introduced DBX_FBSQL. | | | | +--------+---------------------------+ EXAMPLES
Example #1 dbx_connect(3) example <?php $link = dbx_connect(DBX_ODBC, "", "db", "username", "password", DBX_PERSISTENT) or die("Could not connect"); echo "Connected successfully"; dbx_close($link); ?> NOTES
Note Always refer to the module-specific documentation as well. SEE ALSO
dbx_close(3). PHP Documentation Group DBX_CONNECT(3)
All times are GMT -4. The time now is 09:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy