Results 1 to 10 of 11
Right now all my users need to be root to issue the command
dhcpcd -d eth0
to connect to the internet.
I would like all my users to have this ...
- 11-26-2006 #1
Howto allow regular user to connect to Internet?
Right now all my users need to be root to issue the command
dhcpcd -d eth0
to connect to the internet.
I would like all my users to have this power. What do I need to do to allow regular users to issue the command?10" Sony Vaio SRX99P 850MHz P3-M 256MB RAM 20GB HD : ArchLinux
14" Dell Inspiron 1420N 2GHz Core2Duo 2GB RAM 160GB HD : Xubuntu
- 11-26-2006 #2
It's not a direct solution but you can use "sudo"
Put your hand in an oven for a minute and it will be like an hour, sit beside a beautiful woman for an hour and it will be like a minute, that is relativity. --Albert Einstein
Linux User #425940
Don't PM me with questions, instead post in the forums
- 11-26-2006 #3
I don't think you can sudo in arch, I'd prolly have to add it somehow. But even so, that still requires the root password which is what I'm trying to prevent needing.
10" Sony Vaio SRX99P 850MHz P3-M 256MB RAM 20GB HD : ArchLinux
14" Dell Inspiron 1420N 2GHz Core2Duo 2GB RAM 160GB HD : Xubuntu
- 11-26-2006 #4
You can use "sudo" in any distro, but you have to edit the sudoers file, it doesn't work out of the box. You can set sudo just for one command and use it without root password but again, you need to install it and edit the sudoers file
Put your hand in an oven for a minute and it will be like an hour, sit beside a beautiful woman for an hour and it will be like a minute, that is relativity. --Albert Einstein
Linux User #425940
Don't PM me with questions, instead post in the forums
- 11-27-2006 #5
ImNeat, if Arch does not come with sudo, surely you can install it. By default sudo prompts for the password of the invoking user (not root), and you can even turn that off if you're so inclined. There is very thorough documentation in man 5 sudoers.
--------------------------------------------
But... ignoring sudo for the moment:
Why do you not have eth0 obtain an IP address via dhcp at boot time? Is there a reason to jump through extra hoops and run the command yourself?
- 11-27-2006 #6
So there's no way to set it up so that a regular user can
orCode:dhcpcd eth1
?!Code:shutdown -h now
Logging in as root or sudoing are the only options?
That's strange...10" Sony Vaio SRX99P 850MHz P3-M 256MB RAM 20GB HD : ArchLinux
14" Dell Inspiron 1420N 2GHz Core2Duo 2GB RAM 160GB HD : Xubuntu
- 11-27-2006 #7
Check this out, it may help.
HTML Code:http://www.linuxforums.org/forum/misc/57563-halt-reboot-permissons-normal-user.html?highlight=shutdown+user
- 11-28-2006 #8
I ended up just installing sudo, and setting it up so that certain users can issue certain root commands without password:
Wasn't sure if I needed to add /sbin or /usr/sbin for dhcpcd so I added both... (what's the difference?)Code:#/etc/sudoers user1 ALL = NOPASSWD: /sbin/shutdown user1 ALL = NOPASSWD: /sbin/dhcpcd user1 ALL = NOPASSWD: /usr/sbin/dhcpcd user1 ALL = NOPASSWD: /usr/sbin/iwconfig user1 ALL = NOPASSWD: /usr/sbin/iwlist user2 ALL = NOPASSWD: /sbin/shutdown user2 ALL = NOPASSWD: /sbin/dhcpcd user2 ALL = NOPASSWD: /usr/sbin/dhcpcd user2 ALL = NOPASSWD: /usr/sbin/iwconfig user2 ALL = NOPASSWD: /usr/sbin/iwlist
Now
works without password.Code:[user1/2@vaio ~]# sudo shutdown -h now
Thanks to all for the replies.10" Sony Vaio SRX99P 850MHz P3-M 256MB RAM 20GB HD : ArchLinux
14" Dell Inspiron 1420N 2GHz Core2Duo 2GB RAM 160GB HD : Xubuntu
- 11-28-2006 #9
Does anyone know how to set sudo flags? I would like to set the insult flag:
^from the sudoers manpage.insults If set, sudo will insult users when they enter an incorrect
password. This flag is off by default.
I still suck at reading/understanding manpages, so I can't decipher how to enable the flag/parameter.10" Sony Vaio SRX99P 850MHz P3-M 256MB RAM 20GB HD : ArchLinux
14" Dell Inspiron 1420N 2GHz Core2Duo 2GB RAM 160GB HD : Xubuntu
- 11-28-2006 #10Whre the binary is, /sbin is for essential system binaries, /usr/sbin is for non-essential system binariesWasn't sure if I needed to add /sbin or /usr/sbin for dhcpcd so I added both... (what's the difference?)
Sorry, I don't know about "sudo" flagsPut your hand in an oven for a minute and it will be like an hour, sit beside a beautiful woman for an hour and it will be like a minute, that is relativity. --Albert Einstein
Linux User #425940
Don't PM me with questions, instead post in the forums


Reply With Quote
