09-02-2013
You really don't understand my query, i am stopping application that requires to stop some services, for that it is asking for database username/password, database username/password is not present in /etc/passwd it is basically stored in database.
so when i run stop-script.sh it ask me to provide username/password, which i want to put in my script, but don't understand the logic of it. Please it is not operating system /etc/passwd question. This question is related with shell scripting.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
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
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
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_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
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
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
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
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
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
LEARN ABOUT MOJAVE
pwd_mkdb
PWD_MKDB(8) BSD System Manager's Manual PWD_MKDB(8)
NAME
pwd_mkdb -- generate the password databases
SYNOPSIS
pwd_mkdb [-c] [-p | -s] [-d directory] [-u username] file
DESCRIPTION
pwd_mkdb creates db(3) style secure and insecure databases for the specified file. These databases are then installed into /etc/spwd.db and
/etc/pwd.db, respectively. The file is installed into /etc/master.passwd. The file must be in the correct format (see passwd(5)). It is
important to note that the format used in this system is different from the historic Version 7 style format.
The options are as follows:
-c Check if the password file is in the correct format. Do not change, add, or remove any files.
-d directory
Operate in a base directory other than the default of /etc. All absolute paths (including file) will be made relative to directory.
Any directories specified as a part of file will be stripped off. This option is used to create password databases in directories
other than etc; for instance in a chroot(8) jail.
-p Create a Version 7 style password file and install it into /etc/passwd.
-s Only update the secure version of the database. This is most commonly used in conjunction with the -u flag during a password change.
Because the insecure database doesn't contain the password there is no reason to update it if the only change is in the password
field. Cannot be used in conjunction with the -p flag.
-u username
Only update the record for the specified user. Utilities that operate on a single user can use this option to avoid the overhead of
rebuilding the entire database. This option must never be used if the line number of the user's record in /etc/master.passwd has
changed.
file The absolute path to a file in master.passwd format, as described in passwd(5).
The two databases differ in that the secure version contains the user's encrypted password and the insecure version has an asterisk ('*').
The databases are used by the C library password routines (see getpwent(3)).
pwd_mkdb exits zero on success, non-zero on failure.
FILES
/etc/master.passwd current password file
/etc/passwd a Version 7 format password file
/etc/pwd.db insecure password database file
/etc/pwd.db.tmp temporary file
/etc/spwd.db secure password database file
/etc/spwd.db.tmp temporary file
SEE ALSO
chpass(1), passwd(1), db(3), getpwent(3), passwd(5), vipw(8)
STANDARDS
Previous versions of the system had a program similar to pwd_mkdb, mkpasswd, which built dbm(3) style databases for the password file but
depended on the calling programs to install them. The program was renamed in order that previous users of the program not be surprised by
the changes in functionality.
BUGS
Because of the necessity for atomic update of the password files, pwd_mkdb uses rename(2) to install them. This, however, requires that the
file specified on the command line live on the same file system as the /etc directory.
There are the obvious races with multiple people running pwd_mkdb on different password files at the same time. The front-ends to pwd_mkdb,
chpass(1), passwd(1), and vipw(8) handle the locking necessary to avoid this problem.
BSD
June 6, 1993 BSD