Sponsored Content
Top Forums Shell Programming and Scripting Password in shell script for apps stop Post 302849513 by learnbash on Monday 2nd of September 2013 03:48:39 AM
Old 09-02-2013
Currently i am using below code. But it is not working properly.

Code:
stop-service.sh

USERNAME=username
PASS=pass123
./stopservice.sh << EOF
$USERNAME
$PASS
EOF

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

stop Prstat using shell script

How to stop the Prstat using shell script ? because after i run the below script the thing seems to be always in loop and cannot get out till i ctrl + c, is there anything that i can add in the script to make it terminate ? <code> #!/bin/sh prstat -Tc -u testing > testing.txt </code> ... (19 Replies)
Discussion started by: filthymonk
19 Replies

2. UNIX for Dummies Questions & Answers

Stop a shell script

Hi, I am writing a bash shell script. How can I tell it to stop. For example, I would like to have something similar to the following: mike=1 if ; then STOP THE SCRIPT fi (3 Replies)
Discussion started by: msb65
3 Replies

3. Shell Programming and Scripting

How to stop asking password while running shell script?

Hello, I am ftping the file from one unix box to another box. This script works fine. Only problem here is, it is asking the password when ftp the file. How can i stop that. I am providing the password inside the shell script. But it is not accepting this. I need to put this script in crontab.... (5 Replies)
Discussion started by: govindts
5 Replies

4. Shell Programming and Scripting

how to change root password using shell script with standard password

Hi Friends. I am new to scripting now i want to change the root password using the script with standard password. which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Discussion started by: kurva
2 Replies

5. UNIX for Dummies Questions & Answers

Script triggering Korn shell, how-to stop it?

Script_A.sh has echo "In am in script A" ksh ## K-shell is invoked. Script B.sh ## which I am writing... ./script_A.sh echo "I am in script B" return 0 When I run: $> Script_B.sh $> I am in script A $> Basically, on calling Script_A.sh from within Script_B.sh I have the issue of... (2 Replies)
Discussion started by: baivab
2 Replies

6. Shell Programming and Scripting

Help with stop/start Shell Script.

Hi All, I would like to develop a shell script for stop & start an application server (1-4) on Solaris box. Here are the user requirements for this task. 1. User will input the option which server they wish to stop. 2. Will clear cache files from specific location. 3. ... (1 Reply)
Discussion started by: venga
1 Replies

7. Shell Programming and Scripting

Stop! (the countdown!) :-) shell script help

Hi guys, I've found two nifty little scripts on these forums one which detects if the F5 key has been pressed: #/bin/sh _key() { local kp ESC=$'\e' _KEY= read -d '' -sn1 _KEY case $_KEY in "$ESC") while read -d '' -sn1 -t1 kp do _KEY=$_KEY$kp ... (0 Replies)
Discussion started by: rich@ardz
0 Replies

8. AIX

Shell script stop working

I have a strange problem. I have the following in a cron to find files older than a day. find /dir1/dir2/ ! -name . -prune -name "s*.txt" -type f -mtime +1 -exec echo {} \; | wc -w It was working fine for the last few days now it suddenly stopped working. I can clearly see files in the... (5 Replies)
Discussion started by: bbbngowc
5 Replies

9. Shell Programming and Scripting

How to trap APPS/Password dynamically in FCP_LOGIN?

Hi All, Bash shell is being used Could anyone please let me know - How to trap APPS/Password dynamically in FCP_LOGIN variable in bash shell script? Thanks for your time Regards, a1_win (1 Reply)
Discussion started by: a1_win
1 Replies

10. UNIX for Beginners Questions & Answers

How to stop a shell script if it encounters a error?

I am writing a bash shell script for GarazLab's "WP EMAIL CRAWLER - AUTO SCRAPER & REAL TIME EXTRACTOR". it contains some commands. I want to stop the shell execution as soon as it encounters an error. how to do it? (8 Replies)
Discussion started by: tahsin352
8 Replies
Authen::DecHpwd(3pm)					User Contributed Perl Documentation				      Authen::DecHpwd(3pm)

NAME
Authen::DecHpwd - DEC VMS password hashing SYNOPSIS
use Authen::DecHpwd qw( UAI_C_AD_II UAI_C_PURDY UAI_C_PURDY_V UAI_C_PURDY_S lgi_hpwd ); $hash = lgi_hpwd("JRANDOM", "PASSWORD", UAI_C_PURDY_S, 1234); use Authen::DecHpwd qw(vms_username vms_password); $username = vms_username($username); $password = vms_password($password); DESCRIPTION
This module implements the "SYS$HASH_PASSWORD" password hashing function from VMS (also known as "LGI$HPWD"), and some associated VMS username and password handling functions. The password hashing function is implemented in XS, with a hideously slow pure Perl backup version for systems that can't handle XS. FUNCTIONS
UAI_C_AD_II UAI_C_PURDY UAI_C_PURDY_V UAI_C_PURDY_S These constants are used to identify the four password hashing algorithms used by VMS. They are the "UAI$C_" constants in VMS. "UAI_C_AD_II" refers to a 32-bit CRC algorithm. The CRC polynomial used is the IEEE CRC-32 polynomial, as used in Ethernet, and in this context is known as "AUTODIN-II". The hash is merely the CRC of the password. "UAI_C_PURDY", "UAI_C_PURDY_V", and "UAI_C_PURDY_S" refer to successive refinements of an algorithm based on Purdy polynomials. All of these algorithms use the salt and username parameters as salt, use the whole password, and return an eight-byte (64-bit) hash. The main part of the algorithm, the Purdy polynomial, is identical in all three. They differ in the pre-hashing, particularly in the treatment of the username parameter. In "UAI_C_PURDY" the username is truncated or space-padded to 12 characters before being hashed in. "UAI_C_PURDY_V" accepts a variable-length username. "UAI_C_PURDY_S" accepts a variable-length username and also includes the password length in the hash. "UAI_C_PURDY_S" also does some extra bit rotations when hashing in the username and password strings, in order to avoid aliasing. lgi_hpwd(USERNAME, PASSWORD, ALGORITHM, SALT) This is the "SYS$HASH_PASSWORD" function from VMS (also known as "LGI$HPWD"), but with the parameters in a different order. It hashes the PASSWORD string in a manner determined by the other parameters, and returns the hash as a string of bytes. ALGORITHM determines which hashing algorithm will be used. It must be the value of one of the algorithm constants supplied by this module (see above). SALT must be an integer in the range [0, 2^16). It modifies the hashing so that the same password does not always produce the same hash. USERNAME is a string that is used as more salt. In VMS it is the username of the account to which the password controls access. VMS usernames and passwords are constrained in character set and length, and are case-insensitive. This function does not enforce these restrictions, nor perform canonicalisation. If restrictions and canonicalisation are desired then they must be applied separately. The functions "vms_username" and "vms_password" described below may be useful. vms_username(USERNAME) Checks whether the USERNAME string matches VMS username syntax, and canonicalises it. VMS username syntax is 1 to 31 characters from case-insensitive alphanumerics, "_", and "$". If the string has correct username syntax then the username is returned in canonical form (uppercase). If the string is not a username then "undef" is returned. vms_password(PASSWORD) Checks whether the PASSWORD string is an acceptable VMS password, and canonicalises it. VMS password syntax is 1 to 32 characters from case-insensitive alphanumerics, "_", and "$". If the string is an acceptable password then the password is returned in canonical form (uppercase). If the string is not an acceptable password then "undef" is returned. SEE ALSO
VMS::User AUTHOR
The original C implementation of "LGI$HPWD" was written by Shawn Clifford. The code has since been developed by Davide Casale, Mario Ambrogetti, Terence Lee, Jean-loup Gailly, Solar Designer, and Andrew Main (Zefram). Mike McCauley <mikem@open.com.au> created the first version of "Authen::DecHpwd", establishing the Perl interface. This was based on Shawn Clifford's code without the later developments. Andrew Main (Zefram) <zefram@fysh.org> created a new "Authen::DecHpwd" based on the more developed C code presently used, and added ancillary functions. COPYRIGHT
Copyright (C) 2002 Jean-loup Gailly <http://gailly.net> Based in part on code from John the Ripper, Copyright (C) 1996-2002 Solar Designer Copyright (C) 2006, 2007, 2009, 2010, 2011 Andrew Main (Zefram) <zefram@fysh.org> LICENSE
This module is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. perl v5.14.2 2011-11-15 Authen::DecHpwd(3pm)
All times are GMT -4. The time now is 12:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy