Sponsored Content
Full Discussion: Passwd without prompt
Operating Systems SCO Passwd without prompt Post 302998904 by Corona688 on Friday 9th of June 2017 11:34:12 AM
Old 06-09-2017
Quote:
Originally Posted by bakunin
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).
UNIX even has the isatty() call for secure applications, to check whether stdin is a terminal or not, but I've mostly found these sort of apps ignore stdin and grab /dev/tty directly. This is handy since it allows things to successfully prompt for a password even when they're buried deep in a pipe chain.
 

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
MOUNT_FDESC(8)						    BSD System Manager's Manual 					    MOUNT_FDESC(8)

NAME
mount_fdesc -- mount the file-descriptor file system SYNOPSIS
mount_fdesc [-o options] fdesc mount_point DESCRIPTION
The mount_fdesc command attaches an instance of the per-process file descriptor namespace to the global filesystem namespace. The conven- tional mount point is /dev and the filesystem should be union mounted in order to augment, rather than replace, the existing entries in /dev. This command is normally executed by mount(8) at boot time. The options are as follows: -o Options are specified with a -o flag followed by a comma separated string of options. See the mount(8) man page for possible options and their meanings. The contents of the mount point are fd, stderr, stdin, stdout and tty. fd is a directory whose contents appear as a list of numbered files which correspond to the open files of the process reading the directory. The files /dev/fd/0 through /dev/fd/# refer to file descriptors which can be accessed through the file system. If the file descriptor is open and the mode the file is being opened with is a subset of the mode of the existing descriptor, the call: fd = open("/dev/fd/0", mode); and the call: fd = fcntl(0, F_DUPFD, 0); are equivalent. The files /dev/stdin, /dev/stdout and /dev/stderr appear as symlinks to the relevant entry in the /dev/fd sub-directory. Opening them is equivalent to the following calls: fd = fcntl(STDIN_FILENO, F_DUPFD, 0); fd = fcntl(STDOUT_FILENO, F_DUPFD, 0); fd = fcntl(STDERR_FILENO, F_DUPFD, 0); Flags to the open(2) call other than O_RDONLY, O_WRONLY and O_RDWR are ignored. The /dev/tty entry is an indirect reference to the current process's controlling terminal. It appears as a named pipe (FIFO) but behaves in exactly the same way as the real controlling terminal device. FILES
/dev/fd/# /dev/stdin /dev/stdout /dev/stderr /dev/tty SEE ALSO
mount(2), unmount(2), tty(4), fstab(5), mount(8) CAVEATS
No ~. and .. entries appear when listing the contents of the /dev/fd directory. This makes sense in the context of this filesystem, but is inconsistent with usual filesystem conventions. However, it is still possible to refer to both ~. and .. in a pathname. This filesystem may not be NFS-exported. HISTORY
The mount_fdesc utility first appeared in 4.4BSD. 4.4BSD March 27, 1994 4.4BSD
All times are GMT -4. The time now is 04:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy