🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1797

Re: A question on csh/sh.

#1797
From: Brian Fitzgerald
Date: Sat, 17 Nov 1990 19:35
24 lines
1561 bytes
>password change. Basically I want to do:
>	myshscript oldpasswd newpasswd

IMHO, you might want to reconsider this idea for (at least) two reasons.

1. While your shell script is running, anyone else can see your entire
command line, including the plaintext oldpasswd and newpasswd, simply
by typing ps -a.

2. Since the /etc/passwd file is owned by root and not writable by
users, your shell script would have to be executable by everybody but
able to run with the privileges of root, or "suid root". In essence,
you want a "suid root shell script". Just yesterday in this newsgroup
Tom Christiansen reposted a detailed, technical explanation of the
security problems associated with doing this, and the difficulty (or
impossibility) of writing a secure suid root shell script.

If after reading this you now agree with (1) no plaintext passwords on
the command line, and (2) no suid root shell scripts you might as well
stick with good old /bin/passwd (an suid root binary executable), or
some public domain replacement, such as npasswd (anon ftp
emx.utexas.edu in /pub/npasswd).

Brian Fitzgerald
Technical Details
Message-ID: <~0_^-Z^@rpi.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!fitz
References: <70.2743fe39@vax1.cc.lehigh.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!fitz
From: fitz@mml0.meche.rpi.edu (Brian Fitzgerald)
Newsgroups: comp.unix.shell
Subject: Re: A question on csh/sh.
Message-ID: <~0_^-Z^@rpi.edu>
Date: 17 Nov 90 19:35:31 GMT
References: <70.2743fe39@vax1.cc.lehigh.edu>
Organization: Rensselaer Polytechnic Institute, Troy NY
Lines: 24
Nntp-Posting-Host: mml0.meche.rpi.edu