You are not logged in.

#1 2005-07-23 15:15:11

MrHyde
Member
Registered: 2005-07-03
Posts: 23

Is there a network group? How about a shutdown/startup group

I'm doing pretty well with my new arch linux system but I have a couple questions.

I was able to allow my regular user "MrHyde" access to mounting/removing/viewing optical drives by adding him to the "Optical" group. I'd like to allow MrHyde to startup/shutdown the computer and bring up/take down network connections. With Fedora there was a GUI tool for the network thing and shutdown/startup were also taken care of by some scripts tied to the GUI. Unfortunately because of this I have no idea what was really going on or how to recreate it in Arch.

I searched the wiki but didn't really find anything. Using the wiki is painful for me because I always end up noticing something else interesting and thinking "oh hey that's cool I should do that" and completely forgetting the reason I was searching it to start with. smile

Is there a group to add my user to so he can do this or should I be looking for some other method?

quick edit: I'm using fluxbox

Offline

#2 2005-07-23 15:26:50

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Is there a network group? How about a shutdown/startup group

Use sudo

Set up Sudo to allow your regular user to access the halt and reboot commands. Then put 'alias halt='sudo halt' and 'alias reboot=sudo reboot' in your ~/.bashrc.

The sudo syntax is pretty ugly. The man sudoers page will help explain it. Or maybe somebody else here will describe it to you. I don't feel like describing it right now.

Dusty

Offline

#3 2005-07-23 15:33:49

MrHyde
Member
Registered: 2005-07-03
Posts: 23

Re: Is there a network group? How about a shutdown/startup group

I haven't used sudo but as I understand it that would make it so that I'd have to type

sudo command
enter password

which for the hassle of setting it up
su
password
command
isn't all that much worse. Am I right that that's how it works?

Offline

#4 2005-07-23 15:35:01

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Is there a network group? How about a shutdown/startup group

that's why my alias commands are in the ~/.bashrc.

what they do is, if you type 'halt', it runs sudo halt.  Since you can set up sudo to allow commands without passwords, you've effectively made halt as user work.

Dusty

Offline

#5 2005-07-23 15:56:30

MrHyde
Member
Registered: 2005-07-03
Posts: 23

Re: Is there a network group? How about a shutdown/startup group

ah, I understand now. I wasn't aware you could set commands to not need passwords with sudo.

This solution looks like it will work although it seems like there should be a more "official" way to do it. Not to complain, I definitely appreciate the help. It just seems odd to me that linux has no way to control that sort of thing like it controls other things (like the optical drives). Oh well, thanks a bunch! wink

Offline

Board footer

Powered by FluxBB