Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I need to make an adhoc connection on Archlinux (netbook used as a wifi repeater), I was using this tutorial to do it on Ubuntu :

At the terminal install execute sudo apt-get install dnsmasq-base and then sudo apt-get remove dnsmasq

Restart the NetworkManager by executing sudo /etc/init.d/network-manager restart

Left-click on the NetworkManager icon and click "Create New Wireless Network"

Name it "UbuntuAdhoc" and set the encryption to "WEP40"

Connect PC2 using Ad-Hoc to the PC1

The main problem is dnsmasq-mase is missing but dnsmasq is present on Archlinux.

Here's what I found that could be helpful:

https://wiki.archlinux.org/index.php/Dnsmasq https://bbs.archlinux.org/viewtopic.php?id=6431

pacman -S dnsmasq
mkdir /etc/dnsmasq
mv /etc/resolv.conf /etc/dnsmasq
cd /etc
echo nameserver 127.0.0.1 > resolv.conf
mv rc.conf rc.conf.save 
sed  '/DAEMON/s/network/network dnsmasq.local/g' rc.conf.save>rc.conf
cd rc.d
sed  '/-z/s/dnsmasq/dnsmasq -r /etc/dnsmasq/resolv.conf /g' dnsmasq>dnsmasq.local
/etc/rc.d/dnsmasq.local start
/etc/rc.d/network restart

I have a problem with:

sed  '/-z/s/dnsmasq/dnsmasq -r /etc/dnsmasq/resolv.conf /g' dnsmasq>dnsmasq.local

It say that's the ../s/.. is not a known option.

It seems to have broken the networkmanager applet on xfce4. I blacklisted the dnsmasq stuff in /etc/rc.conf, it will be to repair in the progress, I can't use my wifi connection for now but my lan will do for now ...

I also checked about various ways of using a adhoc connection, as my girlfriend use my PC and I travel sometimes, I need a graphical way to make the adhoc connection.

I checked my favorite software wicd but it cannot make multiple connections and adhoc. It said that the version 2.0 maybe would but for now, the only alternative is networkmanager.

So, how I do it?

share|improve this question
    
WEP? Seriously ? Ditch network-manager and use wpasupplicant directly like real men do, so you can use real WPA2 in ad-hoc mode. –  BatchyX Feb 1 '13 at 20:03
add comment

1 Answer

The sed command is broken (I guess people overlooked it somehow on the forum you refer to). It should be:

sed  '/-z/s:dnsmasq:dnsmasq -r /etc/dnsmasq/resolv.conf :g' dnsmasq>dnsmasq.local

The fact that you used that broken sed command resulted in erasing /etc/rc.d/dnsmasq.local (or creating it as an empty file). I don't know the details of how NetworkManager is configured on Ubuntu, but I'm guessing that the fact of /etc/rc.d/dnsmasq.local being empty can have an important impact on your whole network configuration.

You can either:

  • Verify that /etc/rc.d/dnsmasq.local really is empty and if so, remove it - your network configuration should get back to the state at which it was before issuing that unfortunate sed command.

  • cd into `/etc/rc.d/ and run the corrected sed command above. This should create the dnsmasq.local file containing what the author of that forum post really intended. Possibly the rest might work after that.

share|improve this answer
    
Dnsmasq seem to work but I can't use NetworkManager to make my adhoc, it could be something else to do, I wonder what ... –  zillion Oct 9 '11 at 5:01
    
Wiki pages most peoples tell me to try : wiki.archlinux.org/index.php/Ad-hoc_networking wiki.archlinux.org/index.php/… wiki.archlinux.org/index.php/Software_Access_Point The problem is they uses specific options for hardware mostly ... –  zillion Oct 9 '11 at 21:27
    
They use such options because the possibility to use a card in ad-hoc mode is hardware-dependent (or rather hardware-plus-driver-dependent). If the command iwconfig wlan0 mode Ad-Hoc fails (assuming wlan0 is your card), then you will not be able to use ad-hoc mode with that card. –  rozcietrzewiacz Oct 10 '11 at 6:44
    
I was using it on ubuntu so it work ... –  zillion Oct 11 '11 at 1:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.