<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=Big5" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Michael Schwendt wrote:
<blockquote cite="mid20081119093955.91e7061c.mschwendt@gmail.com"
 type="cite">
  <pre wrap="">On Tue, 18 Nov 2008 08:36:56 -0800, Gordon Messmer wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">passwd-wrapper:
#!/bin/sh

# Validate that a username was given as an argument
[ -n "$1" ] || {
        echo "Use: passwd-wrapper <username>" >&2
        exit 64
}

# Validate that the username wasn't "root"
[ "$1" != "root" ] || {
        echo "Can't set the root user's password" >&2
        exit 77
}

# Use -- to make sure that the "username" given wasn't just
# a switch that passwd would interpret.
# THIS ONLY WORKS ON GNU SYSTEMS.
passwd -- "$1"
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Don't let users run this via sudo unless you execute tools with
absolute path --> /usr/bin/passwd  

  </pre>
</blockquote>
Hello,<br>
<br>
Do you means there is some problem / security with this shell scripts ?<br>
BUT, only some of special user who can running some of cmd via sudo...<br>
eg: System Admin ( manager ) and Support Term...<br>
<br>
Thank for your care...<br>
<br>
Edward.
</body>
</html>