09-22-2011
Well, for starters, your password's probably visible to anyone on the system who cares to run ps aux right now. (or whatever ps options for your system show the commandline parameters.) Putting it in a file nixes that.
As for file permissions, you could make the file owned by ldap or something and set 600, so only that user (or root) can read it. Then don't let anyone login to that account. And use sudo to run ldapsearch as that special user.
Nobody can get the password file unless they jump through your hoops, and the one way they're allowed to use it won't hand them the contents.
It won't be protected from root, of course. If the program needs to be given the password as plaintext, you can't protect the password from root, period.
Last edited by Corona688; 09-22-2011 at 02:48 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
There are 2 shell script files sh1 and sh2.
sh2 contains records such as 01 02 03 on different lines.
In sh1, I would like to read each record of sh2 till end of file, concatenate them with a comma(,) and store in a variable.
Can somebody please help me with the sh1 script?
Thanks in... (2 Replies)
Discussion started by: shsandeep
2 Replies
2. Shell Programming and Scripting
There are 2 shell script files sh1 and sh2.
sh2 contains records such as 01 02 03 on different lines.
In sh1, I would like to read each record of sh2 till end of file, concatenate them with a comma(,) and store in a variable.
Can somebody please help me with the sh1 script?
Thanks in... (6 Replies)
Discussion started by: shsandeep
6 Replies
3. Shell Programming and Scripting
I've just written a test harness using ksh.
One of scripts weighed in at 1206 lines.
I came across Eric Raymonds 'Art of Unix programming' on line and he advises against excessively large scripts.
I am very interested to hear people's opinions on this and any experiences they have had. (2 Replies)
Discussion started by: OFFSIHR
2 Replies
4. UNIX for Dummies Questions & Answers
Is HP UNIX and Korn different flavours of unix?
can a korn shell script be written on HP Unix? (4 Replies)
Discussion started by: soujanya_srk
4 Replies
5. IP Networking
Hi guys,
I very appreciate for answering to my previous query.
I have encountered another problem.I have a perl script to display required networking information like DNS,gateway,etc. to be changed in a remote computer which is to be added to a computing cluster.
I need a script which... (0 Replies)
Discussion started by: pranav.mehta3
0 Replies
6. Shell Programming and Scripting
I need to apply password protection to a xls file.I had looked at SpreadSheet::WriteExcel but problem being i dont want to write the contents of file again as the formatting the file would be a pain.
Is there way in which i write a entire file in one go , something like this
... (0 Replies)
Discussion started by: dinjo_jo
0 Replies
7. Red Hat
Hi there everyone. I'm trying to make a bash script that accepts some arguments ans give's back some info about LDAP users and servers.
I have this function :
has_group_access(){
result=$(ldapsearch -LLL "cn=${GROUP_NAME}" cn member | cut -d"," -f1 | cut -d":" -f2 | cut -d"=" -f2 | grep... (1 Reply)
Discussion started by: theboogymaster
1 Replies
8. Shell Programming and Scripting
Hi
$ cat ad.sh
ldapsearorg -x -LLL -h sb1131z.testbadbigcorp.org -D "CN=ADMINZZ,OU=AdminRoles,DC=testbadbigcorp,DC=org" -w "UT3w4f57lll--4...4" -b "OU=Test,DC=testbadbigcorp,DC=org" "(&(&(&(&(objectCategory=person)(objectClass=user)(lockoutTime:1.2.840.113556.1.4.804:=4294967295)))))" dn$... (3 Replies)
Discussion started by: slashdotweenie
3 Replies
9. Programming
Hello,
I am new on PHP scripting .I have shell scripts which I an running currently from linux server but now I want to make a web portal from where I will run all my scripts but the problem is all my scripts ask for parameters so I am getting confused how could I run my shell script from web... (2 Replies)
Discussion started by: anuragpgtgerman
2 Replies
10. Shell Programming and Scripting
I have to hit a very large database to pull fields of information.
I have a script that runs multiple instance of the same query against the data base and writes contents to a file.
The script terminates before the file is completely written to confirmed by
ps -ef | grep <script name>... (3 Replies)
Discussion started by: popeye
3 Replies
LEARN ABOUT HPUX
cmstopres
cmstopres(1m) cmstopres(1m)
NAME
cmstopres - stops resource monitoring on the local node for an EMS resource that is configured in a Serviceguard package.
SYNOPSIS
cmstopres [-v] -p package_name resource_name
DESCRIPTION
cmstopres stops resource monitoring for an EMS resource on the local node. This resource must be configured in the specified package_name.
To stop a resource monitoring for an EMS resource in the package, a user must either be superuser(UID=0), or have an access policy of
FULL_ADMIN allowed in the cluster configuration file. See access policy in cmquerycl(1m) or cmmakepkg(1m).
Options
cmstopres supports the following options.
-v Verbose output will be displayed.
-p package_name
The name of the package where the EMS resource is configured in. This is a required parameter.
resource_name
Name of the EMS resource to stop resource monitoring for. This resource must be configured in the specified package name.
This is a required parameter.
RETURN VALUE
cmstopres returns the following values:
0 Successful completion.
1 Command failed.
EXAMPLES
To stop resource monitoring for the EMS resource /net/interfaces/lan/status/lan0 for package pkgA, do the following:
cmstopres -p pkgA /net/interfaces/lan/status/lan0
AUTHOR
cmstopres was developed by HP.
SEE ALSO
cmstartres(1m), cmquerycl(1m), cmmakepkg(1m),
Requires Optional Serviceguard Software cmstopres(1m)