Sponsored Content
Full Discussion: Passwd without prompt
Operating Systems SCO Passwd without prompt Post 302998901 by bakunin on Friday 9th of June 2017 10:29:17 AM
Old 06-09-2017
Quote:
Originally Posted by jochen
thk you to reply quicky jgt.
I ll try.
No other way to fix the password prompt ?
I am no expert for SCO, but in most UNIXes (and i presume in SCO too) the passwd utility clears the buffer before using stdin, which is the reason why a pipeline won't work (in fact this is the desired effect - passwd is not supposed to work that way).

You can use a program to emulate an interactive session like expect to do what you want. See the expect manual for details, but it quite straightforward: you look for a certain prompt and then feed it a string, the program will think the string was entered by keyboard.

I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

passwd

I have to change more then 200 User at once the password (security-dday). The programm passwd will answers (new password + again) How can i do this in a script? thanks for answers (5 Replies)
Discussion started by: Erwin Stocker
5 Replies

2. UNIX for Dummies Questions & Answers

passwd

hello, I don't why I can't change the password, when ever I try to run passwd I get the problem??!!! unixws1:ldb> passwd passwd: Changing password for ldb Permission denied regards, me (2 Replies)
Discussion started by: geoquest
2 Replies

3. UNIX for Dummies Questions & Answers

etc/passwd

Can anyone explain the second and third fields in /etc/passwd. Thanks. (2 Replies)
Discussion started by: nguda
2 Replies

4. HP-UX

passwd

Dear frnds, I have 250 users in passwd file with different passwords, how i can change the password to username+99. pls help out. regards (6 Replies)
Discussion started by: jestinabel
6 Replies

5. Shell Programming and Scripting

wc /etc/passwd

I have left unix for a long time.Almost forget everthing.:( Anybody can tell me what is the meaning? wc /etc/passwd 9 16 1155 /etc/passwd and $ wc -l /etc/passwd wc -l /etc/passwd 9 /etc/passwd (1 Reply)
Discussion started by: zhshqzyc
1 Replies

6. Solaris

passwd cmd reenables passwd aging in shadow entry

Hi Folks, I have Solaris 10, latest release. We have passwd aging set in /etc/defalut/passwd. I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging. When I reset the users passwd using passwd command, it re enables... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

7. AIX

When did AIX start using /etc/security/passwd instead of /etc/passwd to store encrypted passwords?

Does anyone know when AIX started using /etc/security/passwd instead of /etc/passwd to store encrypted passwords? (1 Reply)
Discussion started by: Anne Neville
1 Replies

8. Shell Programming and Scripting

passwd -s

Hi, I've a problem regarding understanding of result of passwd -s command. > passwd -s abc PS 05/24/12 0 441 I'm not a super user. But i need to write a simple code for checking password expiry and send an email to the team id. Is there any other command or way to achieve this?... (6 Replies)
Discussion started by: sam_bd
6 Replies

9. UNIX for Dummies Questions & Answers

How to Change the % prompt to - prompt in UNIX?

how to Change the % prompt to - prompt in unix :wall: ---------- Post updated at 07:40 AM ---------- Previous update was at 07:38 AM ---------- How To display the last modification time of any file in unix ---------- Post updated at 07:40 AM ---------- Previous update was at 07:40 AM... (2 Replies)
Discussion started by: manjiri sawant
2 Replies

10. Solaris

Unable to move from rsc prompt to ok prompt

Hi, on sunfire v890 unable to move from rsc prompt to ok prompt, i have executed the command break. (9 Replies)
Discussion started by: manoj.solaris
9 Replies
PASSWD(1)							      OpenSSL								 PASSWD(1)

NAME
passwd - compute password hashes LIBRARY
libcrypto, -lcrypto SYNOPSIS
openssl passwd [-crypt] [-1] [-apr1] [-salt string] [-in file] [-stdin] [-noverify] [-quiet] [-table] {password} DESCRIPTION
The passwd command computes the hash of a password typed at run-time or the hash of each password in a list. The password list is taken from the named file for option -in file, from stdin for option -stdin, or from the command line, or from the terminal otherwise. The Unix standard algorithm crypt and the MD5-based BSD password algorithm 1 and its Apache variant apr1 are available. OPTIONS
-crypt Use the crypt algorithm (default). -1 Use the MD5 based BSD password algorithm 1. -apr1 Use the apr1 algorithm (Apache variant of the BSD algorithm). -salt string Use the specified salt. When reading a password from the terminal, this implies -noverify. -in file Read passwords from file. -stdin Read passwords from stdin. -noverify Don't verify when reading a password from the terminal. -quiet Don't output warnings when passwords given at the command line are truncated. -table In the output list, prepend the cleartext password and a TAB character to each password hash. EXAMPLES
openssl passwd -crypt -salt xx password prints xxj31ZMTZzkVA. openssl passwd -1 -salt xxxxxxxx password prints $1$xxxxxxxx$UYCIxa628.9qXjpQCjM4a.. openssl passwd -apr1 -salt xxxxxxxx password prints $apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0. 1.0.1i 2009-07-20 PASSWD(1)
All times are GMT -4. The time now is 11:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy