Carl Lowenstein wrote:
On Fri, Aug 1, 2008 at 9:25 AM, Ralph Shumaker <[EMAIL PROTECTED]> wrote:
Basically, I would like to limit sudo usage to this machine, whether it be
the console F1 thru F6, or virtual terminals (gnome-terminal usually).
sudoers allows the option of limiting venue to a particular hostname. I
don't know how to tell what hostnames I have, and ifconfig only lists the
devices along with their associated specs, minus hostnames.
I know I have localhost for lo. And eth0 is assigned
[EMAIL PROTECTED], but this infrequently changes.
I don't recall how to set an _extra_ hostname, or even *if* it can be done.
Every path I think to try, eventually leads me to dead ends. I may have
already encountered what I need, but just didn't recognize it for whatever
reason.
The command that you are perhaps looking for is "hostname".
It can be used to find or change your hostname.
On a Fedora/RedHat type system, the file /etc/sysconfig/network has a line
HOSTNAME=
You can also enter the hostname of your choice in /etc/hosts as an
alias for localhost.
127.0.0.1 localhost.localdomain localhost yourname
Well, then, if I am getting this correctly:
If I want rafael to be able to run ALL commands as (ALL) users, but only
from the local machine (i.e. *not* if connected in from some remote
machine), then in sudoers, I can use:
rafael localhost = (ALL) ALL
Is that about the gist of it? I don't know much about this. I don't
think this would mess anything up, but I'd hate to open up my machine to
any cracker with basic skills, just because of some rookie mistake.
--
Ralph
--------------------
Relief, or redistribution of income, voluntary or coerced, is never the
true solution of poverty, but at best a makeshift, which may mask the
disease and mitigate the pain, but provides no basic cure.
--Henry Hazlitt
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list