- Subject: Re: [sudo-users] How to disable ( deny ) user to change the password of root
- From: Michael Schwendt <mschwendt@xxxxxxxxx>
- Date: Wed, 19 Nov 2008 09:39:55 +0100
- In-reply-to: <4922EF28.1020304@xxxxxxxxx>
- Reply-to: "Community assistance, encouragement, and advice for using Fedora." <fedora-list@xxxxxxxxxx>
On Tue, 18 Nov 2008 08:36:56 -0800, Gordon Messmer wrote:
> 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"
Don't let users run this via sudo unless you execute tools with
absolute path --> /usr/bin/passwd
--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Older Fedora Users Mail]
[Home]
[Fedora Announce]
[Fedora News]
[Fedora Advisory Board]
[Fedora Education]
[Fedora Security]
[Fedora Robotics]
[Fedora Maintainers]
[Fedora Infrastructure]
[Fedora Websites]
[Anaconda Devel]
[Fedora Devel Java]
[Fedora Legacy]
[Fedora Desktop]
[Fedora Fonts]
[iPod Nano]
[ATA RAID]
[Fedora Bible]
[Fedora Marketing]
[Fedora Management Tools]
[Fedora Mentors]
[Fedora Package Announce]
[SSH]
[Find Someone Special]
[Fedora Package Review]
[Fedora R Devel]
[Fedora PHP Devel]
[Kickstart]
[Fedora Music]
[Fedora Packaging]
[Centos]
[Fedora SELinux]
[Fedora Legal]
[Fedora Kernel]
[Fedora QA]
[Fedora Triage]
[Fedora OCaml]
[Coolkey]
[ET Management Tools]
[Yum Users]
[Tux]
[Big List of Linux Books]
[Yosemite News]
[Yosemite Photos]
[Linux Apps]
[Maemo Users]
[Gnome Users]
[KDE Users]
[Fedora Tools]
[Fedora Art]
[Fedora Docs]
[Maemo Users]
[Asterisk PBX]
[Fedora Sparc]
[Fedora Universal Network Connector]
[Fedora ARM]
[Fedora 8 and Red Hat Enterprise Linux Bible]