Re: How to use sudo?
Charles A Edwards <[email protected]> Sun, 10 Jul 2011 18:02:33 -0400
| Newsgroups | gmane.linux.mandrake.newbie |
|---|---|
| Message-ID | <[email protected]> |
--Sig_/BlBGnS55DxGlvKXNfoHeEwR Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sun, 10 Jul 2011 21:48:48 +0100 Len Lawrence <lcl-s9phx+4gxdMG2Il/[email protected]> wrote: > # User privilege specification > root ALL=3D(ALL) ALL > lcl localhost=3D (root) NOPASSWD: /usr/sbin/urpmi, /usr/sbin/urpme >=20 > # Uncomment to allow people in group wheel to run all commands > # %wheel ALL=3D(ALL) ALL >=20 > # Same thing without a password > # %wheel ALL=3D(ALL) NOPASSWD: ALL >=20 > # Samples > # %users ALL=3D/sbin/mount /cdrom,/sbin/umount /cdrom > # %users localhost=3D/sbin/shutdown -h now >=20 > This syntax is accepted by visudo. > Then as lcl: >=20 > sudo urpmi whatever >=20 > This asks for a password. lcl's password results in "lcl is not > allowed to run sudo". > root's password is rejected. >=20 > What now? lcl ALL=3D(ALL) NOPASSWD: /usr/sbin/urpmi, /usr/sbin/urpme will allow user lcl to use sudo to run the listed commands/apps with root privileges lcl ALL=3D(ALL) NOPASSWD: ALL will allow user lcl to use sudo to run any command/app with root privileges. Charles --=20 "Let every man teach his son, teach his daughter, that labor is honorable." -- Robert G. Ingersoll ---------------------- Mandriva Linux release 2012.0 (Cooker) for x86_64$ On SuperSize....http://www.eslrahc.com Registered Linux user #182463 2.6.38.7-tmb-server-1mdv x86_64 ---------------------- --Sig_/BlBGnS55DxGlvKXNfoHeEwR Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk4aIXkACgkQMYWkoYueEqtlRwCgpPCKK6hXhspwZx2gPltLvpMG TaQAoL0NWP/O7MaZNF4mrMOG4yUG/4HM =u/Au -----END PGP SIGNATURE----- --Sig_/BlBGnS55DxGlvKXNfoHeEwR--