Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Setting config database user and password using sed Post 303035067 by Neo on Monday 13th of May 2019 12:25:12 PM
Old 05-13-2019
Maybe just keep it simple?

Code:
sed -i.bak 's/old-text/new-text/g' filename

In your case:

Code:
sed -i.bak  's/oldpass/newpass/g' config.php

This User Gave Thanks to Neo For This Post:
 

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
sasl_setpass(3) 						  SASL man pages						   sasl_setpass(3)

NAME
sasl_setpass - Check a plaintext password SYNOPSIS
#include <sasl/sasl.h> int sasl_setpass(sasl_conn_t *conn, const char *user, const char *pass, unsigned passlen, const char *oldpass, unsigned oldpasslen, unsigned flags) DESCRIPTION
sasl_setpass will set passwords in the sasldb, and trigger the setpass callbacks for all available mechanisms. user is the username to set the password for. pass and passlen are the password to set and its length oldpass and oldpasslen are the old password & its length (and are optional) flags Are flags including SASL_SET_CREATE and SASL_SET_DISABLE (to cause the creating of nonexistent accounts and the disabling of an account, respectively) NOTES
oldpass and oldpasslen are unused in the Cyrus SASL implementation, though are passed on to any mechanisms that may require them. RETURN VALUE
Returns SASL_OK on success. SASL error code on failure. CONFORMING TO
RFC 4422 SEE ALSO
sasl(3), sasl_errors(3), sasl_checkpass(3) SASL
10 July 2001 sasl_setpass(3)
All times are GMT -4. The time now is 09:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy