LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   dhclient (https://www.linuxquestions.org/questions/linux-wireless-networking-41/dhclient-327429/)

laurentwahl 05-26-2005 04:20 PM

dhclient
 
I have two little problems with dhclient.
After running the dhclient with
Quote:

/sbin/dhclient ath0
my terminal and all other applications don't start any more. then I log out and log in and it works. how can I make it wark without logging out and in?

My second problem is, that I can run dhclient only as root. When I run it as a normal user, he says:
Quote:

can't create /var/lib/dhcp/dhclient.leases: Permission denied
SIOCSIFADDR: Permission denied
SIOCSIFFLAGS: Permission denied
SIOCSIFFLAGS: Permission denied
Open a socket for LPF: Operation not permitted
How can I set the permissions that I can run dhclient as normal user.

username17 05-26-2005 06:36 PM

Hello,
First off, I'd like to say I have _no_ wireless experience, but the following might work:

Add this to /etc/networks

iface wlan0 inet dhcp
wireless-essid home
wireless-key XXXXXXXXXXXXXXXXXXXXXXX

auto wlan0

but update the essid and key as needed.
This may not work, this is my shot in the dark.
GL,
-Jason

laurentwahl 05-27-2005 03:25 AM

I don't have a networks file.
And I don't want that dhclient runs at startup, because I only use wireless in my school, so it should only start when I type dhclient. But i want to do this without logging out afterwarts and I don't want to do this as root

2Gnu 05-27-2005 08:32 AM

Logging out?

You know that you can just do this from a console, right? You don't have to log out and back in again.

Alternatively, you can use the sudo command by adding dhclient to the sudoers file. man sudo for details.

laurentwahl 05-29-2005 04:14 PM

I am new with linux, and I don't know how I can do this from a console

2Gnu 05-29-2005 08:06 PM

Assuming you're up and running in Gnome:

Open a Gnome terminal.
At the $ prompt, type su (it might be su - instead of just su. RH is kind of goofy about root path), enter.
Enter your root password.
At the # prompt, type dhclient ath0.
exit.

Goggle for the One Page Linux Manual. Print it and keep a copy with you. Eventually, you should edit (or create if it's not there) the boot script for the interface.

Sudo allows you to give certain users permission to run commands that would otherwise only be available to root and would be an alternative to logging in as root.. It's not something to do cavalierly, and certainly a lesson for another day. Learn to use the man pages first.

laurentwahl 05-30-2005 12:35 AM

2Gnu said
Quote:

Assuming you're up and running in Gnome:

Open a Gnome terminal.
At the $ prompt, type su (it might be su - instead of just su. RH is kind of goofy about root path), enter.
Enter your root password.
At the # prompt, type dhclient ath0.
exit.
when I do this I can't open any more my applications, like firefox. then I log out, and back in(as the same user), then it works. sorry when i didn't express me clearly.


All times are GMT -5. The time now is 07:07 AM.