diff options
Diffstat (limited to 'localpasswd')
-rwxr-xr-x | localpasswd | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/localpasswd b/localpasswd index c216bf7..790f10f 100755 --- a/localpasswd +++ b/localpasswd @@ -11,4 +11,7 @@ # TODO: Only allow handling regular users # -exec sudo /usr/bin/passwd $1 +sudo=sudo +[ "$(id -u)" -ne 0 ] || sudo= + +exec $sudo /usr/bin/passwd $1 |