Sign in to follow this  
Followers 0
jason87x

is there any command line equivalent to networkmanager?

11 posts in this topic

is there any command line equivalent to networkmanager? I will eventually not be using X, doing things using a framebuffer instead. why? because i want pretty much everything to be able to be used from keyboard, as i absolutely hate the touchpad and clicker thing on my asus eee, though this interface seems awkward for me on any laptop. keyboard is just so much more efficient anyways. so does anyone know if there is some sort of equivalent on command line for networkmanager/knetworkmanager?

0

Share this post


Link to post
Share on other sites
ifconfig

Did you bother looking what networkmanager did before you answered? These types of one-word answers (unless they really and truly answer the question) don't help anyone.

I assume you mean the NetworkManager that allows you to switch different network profiles? For instance, a DSL profile for home, an open Wifi profile, a work profile? You're going to have to give more information on what you want to do and how you're doing it now. There's always a way to do it from the command-line, but it's not always the most direct route, and it's kind of hard to give advice unless we know what it is you really want to do.

0

Share this post


Link to post
Share on other sites

well the thing is... going thru wpa_supplicant and doing things that way manually entering in stuff as such...

network={

ssid="name"

psk="something here in hexadecimal"

key_mgmt=WPA-PSK

proto=WPA

}

hasn't worked when i go to use dhclient...

as for the psk key, the router admin gave simply the passphrase in hex (64 hex characters long) but using wpa_passphrase on the ascii version gave a different hex value than the one he gave me... putting in the 64 char hex value into networkmanager worked fine. lol this sounds confusing but i'm confused as to why wpa_passphrase would give a different hex value than what he gave me... i think in his sample /etc/wpa.conf either the ascii or the hex was commented out.

I just don't understand why networkmanager works without asking questions and why the manual ways don't work for me even when I have things correct.

0

Share this post


Link to post
Share on other sites

OK, so you want to be able to connect to different (or maybe just a single) wifi networks. Now that we have that out of the way... well, I don't know how to do that from the command-line :P I let the GUI do that for me, it's not something I'm really interested in. I'm sure someone here knows though.

0

Share this post


Link to post
Share on other sites

ive never had to connect to wifi from bash as the only computers that actually work for linux are servers so its automatically configured when i plug in ethernet. but fairly sure its ifconfig you want. http://www.ss64.com/bash/ifconfig.html you can always use kismet to show you which networks are available.

a looks to be helpfull link for setting up wifi on command line. http://www.linuxhomenetworking.com/wiki/in...less_Networking

Edited by dinscurge
0

Share this post


Link to post
Share on other sites
ive never had to connect to wifi from bash as the only computers that actually work for linux are servers so its automatically configured when i plug in ethernet. but fairly sure its ifconfig you want. http://www.ss64.com/bash/ifconfig.html you can always use kismet to show you which networks are available.

a looks to be helpfull link for setting up wifi on command line. http://www.linuxhomenetworking.com/wiki/in...less_Networking

i've never done wpa from the command line however i have connected to a wep access point using iwconfig http://linuxcommand.org/man_pages/iwconfig8.html there's a switch for wpa too.

0

Share this post


Link to post
Share on other sites
I just don't understand why networkmanager works without asking questions and why the manual ways don't work for me even when I have things correct.

Sorry, I'm kinda lost in regards of exactly what is going on. Exactly, how are you entering this manually, and what does not work?

Could you post the exact wpa_supplicant commands you are issuing?

0

Share this post


Link to post
Share on other sites
well the thing is... going thru wpa_supplicant and doing things that way manually entering in stuff as such...

The cool thing about wpa_supplicant is you can define multiple networks in wpa_supplicant.conf, and wpa_supplicant will connect to whichever network is in range. Each workday I connect to 3 WAPs. 1 WPA, 1 WPA2, and 1 WEP 128. The way I manage this is with a shell script. The wpa part is easy, just start wpa_supplicant, wait about 10 seconds (sleep 10) for the association to take place, and then run dhclient. The same wpa_supplicant command is used to access both WPA networks (as they are defined in /etc/wpa_supplicant.conf) To connect to the WEP network, I just use iwconfig. Now I believe you can do all of this with wpa_supplicant, but I just haven't bothered yet.

as for the psk key, the router admin gave simply the passphrase in hex (64 hex characters long) but using wpa_passphrase on the ascii version gave a different hex value than the one he gave me... putting in the 64 char hex value into networkmanager worked fine. lol this sounds confusing but i'm confused as to why wpa_passphrase would give a different hex value than what he gave me... i think in his sample /etc/wpa.conf either the ascii or the hex was commented out.

You shouldn't need to use wpa_passphrase on the passphrase the admin gave you. I'm assuming what he gave you is just a long random string that is indeed the password. That's why it works in network manager, it's just using that as your password. Your wpa_supplicant.conf entry would look something like:

network={
ssid="home"
key_mgmt=WPA-PSK
psk="long ass string the admin gave you"
}

*EDIT* I don't have my laptop here but just FYI that script looks something like:

#!/bin/bash
if [[ $@ == "work" || $@ == "home" ]]; then
wpa_supplicant -Dwext -c/etc/wpa_supplicant.conf
sleep 10
dhclient wlan0

elif [[ $@ == "school" ]]; then
iwconfig wlan0 essid workssid key somekey
fi

Yes it's stupid, but you can get the point from it.

Edited by mecca_
1

Share this post


Link to post
Share on other sites

You could try wicd, it has a nice curses UI and isn't much different from networkmanager.

0

Share this post


Link to post
Share on other sites

Under Ubuntu/Debian the is a package call ifscheme.

http://packages.ubuntu.com/jaunty/ifscheme

You can create alternate wireless networks listed in /etc/network/interfaces. It will scan wireless with 'essidscan' and bring up the appropriate network (first found) when you do an 'ifup eth1' (for example). It does not auto-detect loss of connection, you have to manually 'ifdown' and 'ifup' if you change location.

Works for me OK.

Mungewell.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0