Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Setting config database user and password using sed Post 303035093 by MadeInGermany on Tuesday 14th of May 2019 02:20:01 PM
Old 05-14-2019
Making it a bit more precise, so it would not match e.g. a __DATABASE_PASSWORD_ENABLED__
Code:
sed '/"__DATABASE_PASSWORD__"/ s/oldpass/newpass/'

The alternative is without a selector, instead have the substitution match include the selector:
Code:
sed 's/\("__DATABASE_PASSWORD__".*\)oldpass/\1newpass/'

Everything that matches is substituted, so one must capture in a \(group\) and give it back as \1 in the substitution string.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

I can't fire up MySql on my Fedora Server - Obvious config setting?

Hiya All, I can't fire up MySql on my FC-3 Server at work. I get the Error message at the end of this post. Looks like some Config problem on the Server itself. (Ie web server and MYSQL is all on the same box. I get the same errror when trying to fire up MYSQL at the Box, as well as... (2 Replies)
Discussion started by: marty 600
2 Replies

2. UNIX for Advanced & Expert Users

UX Kernel setting while database installation

Hi All I am kinda wondering about the UX kernel parameters, how we configure and why do we configure ???.. especially the 'semaphores'. Could somebody throw some light on this and would really appreciate it. (1 Reply)
Discussion started by: Prince_Charming
1 Replies

3. UNIX for Advanced & Expert Users

setting password for user using useradd?

hi all i am writing a script to create user and group from the input given to script for eg. script needs to values 1. mode - 1 or 2 2. id - if mode is 1 then id should be 2 char like x1 / v1 / v2 if mode is 2 then id should be 1 char like x / v / e from these to values group is... (1 Reply)
Discussion started by: zedex
1 Replies

4. Solaris

Password Setting

Hi: Could I set the: - Login Time-out Interval - Password History Count - Lockout Duration - Lockout Threshold for user account in Sun Solaris 5.8. Thanks for your help (6 Replies)
Discussion started by: mlsun
6 Replies

5. UNIX for Dummies Questions & Answers

Firefox: Setting about:config options upon install

Is there a way to set the about:config options for Firefox automatically as part of the installation of Firefox? (3 Replies)
Discussion started by: figaro
3 Replies

6. UNIX for Advanced & Expert Users

Can we Automate the User creation and setting password through a script in solaris 10

Hi, I am using Solaris 10 OS and Bash shell.Is there any way can we automate User creation and setting passwords through a script or any freeware tool. Advance thanks for your response. (1 Reply)
Discussion started by: muraliinfy04
1 Replies

7. Solaris

Is there a difference between setting a user as nologin and setting it as a role?

Trying to figure out the best method of security for oracle user accounts. In Solaris 10 they are set as regular users but have nologin set forcing the dev's to login as themselves and then su to the oracle users. In Solaris11 we have the option of making it a role because RBAC is enabled but... (1 Reply)
Discussion started by: os2mac
1 Replies

8. Shell Programming and Scripting

Setting up postgreSql database

Hi I have a small bash script which I want to run on an Amazon EC2 Ubuntu instance for setting up a postgreSQL database: #!/bin/bash USERNAME='postgres' start=$SECONDS TMP_DIR=/local/test/4g4d PORT=23456 rm -rf $TMP_DIR/db mkdir -p $TMP_DIR/ echo "creating database..."... (3 Replies)
Discussion started by: Helveticus
3 Replies

9. Shell Programming and Scripting

DB Password encryption in config file

Hi Gurus, I need to encrypt the Db passwords which are stored in a configuration file (.txt) as below: stage_db_pwd=ABC this is test line content_db_pwd=123def This is test line 2 stg_db_name=xyz I want to encrypt all the password fields (identified by "pwd"), encrypt them in the same... (3 Replies)
Discussion started by: ashishpanchal85
3 Replies
fixnt(1)							      Debian								  fixnt(1)

NAME
fixnt - Filter for the Windows NT postscript printer driver. SYNOPSIS
fixnt < BADFILE.ps > GOODFILE.ps DESCRIPTION
The Windows NT postscript driver has a tendency to make broken postscript files, that are incompatible with psutils. fixnt is a filter that fixes these problems, allowing the use of psnup(1). The filter takes the broken postscript file on stdin, and outputs a fixed postscript file on stdout. It has no other form for invocation and takes no options on the command-line. OPTIONS
fixnt takes no options. BUGS
fixnt does not check for NTPSOct94. For a workaround, use a sed(1) command to replace 'NTPSOct94' with 'NTPSOct95', like so: sed 's/NTPSOct94/NTPSOct95/g' This is particularly important for Windows NT 3.5 users. AUTHOR
fixnt was written by Holger Bauer <Holger.Bauer@topmail.de>, Michael Rath <rath@itsm.uni-stuttgart.de>, and Akim Demaille <demaille@inf.enst.fr>. REPORTING BUGS
Report bugs to the Authors, but avoid sending large postscript files. Patches are always welcome; send to <bauer@itsm.uni-stuttgart.de>. SEE ALSO
psnup(1), sed(1) a2ps February 2003 fixnt(1)
All times are GMT -4. The time now is 04:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy