dragorn wrote:
On Mon, Nov 12, 2012 at 12:25:51PM -0500, Adam wrote:
It just seems strange to me that the same command (even if unlikely and unsafe) should produce different yet successful results under different distros.
Single quotes would get the root shell path, double would get the
executing users path and has nothing to do w/ sudo (as jack noted).

But as I mentioned, with single quotes (as in the subject header) some distros return the user's path, others return root's path. Even if it's a command that shouldn't be counted on, I was surprised to see a difference between distros. My test system has room for 7 different distros, so I'm learning about other ways to do things in Linux than "the Mandriva way".

Sudo by default filters most/all environment variables, because it can
be a huge security risk.  Massively so if you have a multiuser system
which uses restricted sudo to allow users to perform specific tasks
(vs a single-user system like an ubuntu desktop which uses sudo to
raise privs of the single owner)

That answers another question I was going to ask someday, why some distros allow an unprivileged user to "poweroff" but others require privileges. Thanks!

Adam

_______________________________________________
Mid-Hudson Valley Linux Users Group                  http://mhvlug.org
http://mhvlug.org/cgi-bin/mailman/listinfo/mhvlug

Upcoming Meetings (6pm - 8pm)                         Vassar College
 Dec 5 - SysAdmin Panel
 Jan 9 - High Performance Computing
 Feb 6 - February Meeting

Reply via email to