Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > Your Distro > Other Distributions > Arch Linux Help
Reload this Page Howto allow regular user to connect to Internet?
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Arch Linux Help Help an discussion related to Arch

Site Navigation
Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 11-26-2006   #1 (permalink)
Linux User
 
ImNeat's Avatar
 
Join Date: Feb 2006
Location: N. America
Posts: 389
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.1" Dell Inspiron 1420 2GHz Core2Duo 2GB RAM 160GB HD : ArchLinux
ImNeat is offline   Reply With Quote
Old 11-26-2006   #2 (permalink)
Linux Guru
 
Juan Pablo's Avatar
 
Join Date: Mar 2006
Location: /home/south_america/ecuador/quito
Posts: 2,059
Send a message via MSN to Juan Pablo
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
Juan Pablo is offline   Reply With Quote
Old 11-26-2006   #3 (permalink)
Linux User
 
ImNeat's Avatar
 
Join Date: Feb 2006
Location: N. America
Posts: 389
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.1" Dell Inspiron 1420 2GHz Core2Duo 2GB RAM 160GB HD : ArchLinux
ImNeat is offline   Reply With Quote
Old 11-26-2006   #4 (permalink)
Linux Guru
 
Juan Pablo's Avatar
 
Join Date: Mar 2006
Location: /home/south_america/ecuador/quito
Posts: 2,059
Send a message via MSN to Juan Pablo
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
Juan Pablo is offline   Reply With Quote
Old 11-27-2006   #5 (permalink)
Linux Guru
 
anomie's Avatar
 
Join Date: Mar 2005
Location: Texas
Posts: 1,697
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?
anomie is offline   Reply With Quote
Old 11-27-2006   #6 (permalink)
Linux User
 
ImNeat's Avatar
 
Join Date: Feb 2006
Location: N. America
Posts: 389
So there's no way to set it up so that a regular user can
Code:
dhcpcd eth1
or
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.1" Dell Inspiron 1420 2GHz Core2Duo 2GB RAM 160GB HD : ArchLinux
ImNeat is offline   Reply With Quote
Old 11-27-2006   #7 (permalink)
Just Joined!
 
theLinuxPeasant's Avatar
 
Join Date: Nov 2006
Location: York,UK - Athens, Greece
Posts: 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
theLinuxPeasant is offline   Reply With Quote
Old 11-28-2006   #8 (permalink)
Linux User
 
ImNeat's Avatar
 
Join Date: Feb 2006
Location: N. America
Posts: 389
I ended up just installing sudo, and setting it up so that certain users can issue certain root commands without password:
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
Wasn't sure if I needed to add /sbin or /usr/sbin for dhcpcd so I added both... (what's the difference?)

Now
Code:
[user1/2@vaio ~]# sudo shutdown -h now
works without password.

Thanks to all for the replies.
__________________
10" Sony Vaio SRX99P 850MHz P3-M 256MB RAM 20GB HD : ArchLinux
14.1" Dell Inspiron 1420 2GHz Core2Duo 2GB RAM 160GB HD : ArchLinux
ImNeat is offline   Reply With Quote
Old 11-28-2006   #9 (permalink)
Linux User
 
ImNeat's Avatar
 
Join Date: Feb 2006
Location: N. America
Posts: 389
Does anyone know how to set sudo flags? I would like to set the insult flag:
Quote:
insults If set, sudo will insult users when they enter an incorrect
password. This flag is off by default.
^from the sudoers manpage.

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.1" Dell Inspiron 1420 2GHz Core2Duo 2GB RAM 160GB HD : ArchLinux
ImNeat is offline   Reply With Quote
Old 11-28-2006   #10 (permalink)
Linux Guru
 
Juan Pablo's Avatar
 
Join Date: Mar 2006
Location: /home/south_america/ecuador/quito
Posts: 2,059
Send a message via MSN to Juan Pablo
Quote:
Wasn't sure if I needed to add /sbin or /usr/sbin for dhcpcd so I added both... (what's the difference?)
Whre the binary is, /sbin is for essential system binaries, /usr/sbin is for non-essential system binaries



Sorry, I don't know about "sudo" flags
__________________
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
Juan Pablo is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Job Search
keyword location
Post a Job »
job title, keywords or company
city, state or zip jobs by job search

Free Magazines
Free eBook:"Vulnerability Management for Dummies"
Get all the Facts and See How to Implement a Successful Vulnerability Management Program.
subscribe
Google vs The World: The Battle of the Message Security Vendors
With such a powerful name behind it, Google Message Security stands out in a sea of products that do exactly the same thing - or so they say. So when it comes right down to it, how does the Google selection stack up against the rest of messaging security's big guns?
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 08:07 PM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0