01-12-2002
Try ...
sed "s/oldpass/newpass/g" userfile > userfile.new
mv userfile userfile.old
mv userfile.new userfile
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
i log into an xterm with bash shell but the character size of the xterm shell is too small.
how can i enlarge the size of text on this xterm bash shell? (3 Replies)
Discussion started by: armen
3 Replies
2. UNIX for Dummies Questions & Answers
I have a text
"abc def ghi"
and I want to get it as
"def abc ghi"
I am using this
echo "abc def ghi" | sed 's/\(*\)\(*\)/\2\1/'
But I am not able to get the output, could anyone help me.
Thanks (9 Replies)
Discussion started by: venu_nbk
9 Replies
3. Shell Programming and Scripting
I have a text file with a bunch of ethernet port names and host names. I need to just change the last 2 chars on each line to a new number how can I do this quickly?
from
ethernet5/35 Net01
ethernet5/36 Net01
ethernet5/37 Net01
ethernet5/38 Net01
to
ethernet5/35 Net02
ethernet5/36... (4 Replies)
Discussion started by: kingdbag
4 Replies
4. Shell Programming and Scripting
hello
I have this:
sed -e "s/install_location=....../g" -e "s/hostname=....../g" -e "s/server_name=....../y" input.txt
it will display on the screen what have changed. however I want to change file input.txt. Any idea other than doing redirection (>)
thx (2 Replies)
Discussion started by: melanie_pfefer
2 Replies
5. Shell Programming and Scripting
i all,
I thought I would restructure my question.
Is there a way you can get rid of characters in a line if you know what number they are.
eg,
if this was a line
you could see there were 18 characters including spaces. Could I delete characters 4,5,6 and 7 to remove the word this. ... (2 Replies)
Discussion started by: outthere_3
2 Replies
6. Shell Programming and Scripting
I am doing a basic script to check if services are disabled, and I was wondering how to change to colours for PASS and FAIL to green & red respectively.
#!/usr/bin/bash
clear
TELNET=`svcs -a | grep telnet | awk '{print $1}'`
if
then
RESULT=PASS
else
RESULT=FAIL
fi... (3 Replies)
Discussion started by: detatchedd
3 Replies
7. Programming
I'm writing my own Unix ls command in c and I was wondering if anyone knows how to or can point me to a tutorial that shows me how to change the text color of the filename depending on if it's a directory, regular file, linked file, etc..., like the real ls command does? Thanks. (4 Replies)
Discussion started by: snag49ers
4 Replies
8. Shell Programming and Scripting
I have a file as below and want to change it using awk
I want to find the entries such as
Iteration No.788
Best Value 0.00408152
Next-Worst Value 0.00522935
Worst Value 0.00523487
and change it to
Iteration No.788
788. Best Value = 0.00408152
788. ... (8 Replies)
Discussion started by: kristinu
8 Replies
9. UNIX for Dummies Questions & Answers
I'm changing some html code on multiple web pages and I need to match particular phrases but keep some text within each phrase.
E.G. I need to change this line:
<DIV id="heading">Description:</DIV>
into
<span class="hlred">Description:</span><br />
The text "Description:" may... (2 Replies)
Discussion started by: hal8000
2 Replies
10. UNIX for Dummies Questions & Answers
Hello, I have a situation where I want to change a line of text in multiple files, but the problem is that I want to change the text to something unique for each file.
For example, let's say I have five files named bob.txt, joe.txt, john.txt, tom.txt, and zach.txt. Each of these files has a... (5 Replies)
Discussion started by: Scatterbrain26
5 Replies
LEARN ABOUT SUNOS
sasl_setpass
sasl_setpass(3SASL) Simple Authentication Security Layer Library Functions sasl_setpass(3SASL)
NAME
sasl_setpass - set the password for a user
SYNOPSIS
cc [ flag ... ] file ... -lsasl [ library ... ]
#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
Use the sasl_setpass() interface to set passwords. sasl_setpass() uses the SASL_CB_SERVER_USERDB_SETPASS callback, if one is supplied.
Additionally, if any server mechanism plugins supply a setpass callback, the setpass callback would be called. None of the server mecha-
nism plugins currently supply a setpass callback.
PARAMETERS
conn The SASL connection context
user The username for which the password is set
pass The password to set
passlen The length of pass
oldpass The old password, which is optional
oldpasslen The length of oldpass, which is optional
flags Refers to flags, including, SASL_SET_CREATE and SASL_SET_DISABLE. Use these flags to create and disable accounts.
RETURN VALUES
sasl_setpass() returns an integer that corresponds to a SASL error code.
ERRORS
SASL_OK The call to sasl_setpass() was successful.
See sasl_errors(3SASL) for information on SASL error codes.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWlibsasl |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
sasl_errors(3SASL), sasl_getprop(3SASL), attributes(5)
SunOS 5.10 15 Oct 2003 sasl_setpass(3SASL)