Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Samba issue
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2113

PostPosted: Tue May 27, 2014 9:27 am    Post subject: [SOLVED] Samba issue Reply with quote

Hi, ALL,
I followed an instruction on how to set up Samba described here.
Now my issues are:

Code:

IgorReinCloud igor # /etc/init.d/samba start
 * Caching service dependencies ...                                       [ ok ]
 * WARNING: samba is scheduled to start when net.eth0, net.wlan0 has started


This I don't understand. I have net.wlan0 working as I'm connected to the Internet/network, but samba does not see it?
So, next is check the configuration.

Code:

IgorReinCloud linux # /usr/bin/testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[public]"
WARNING: The security=share option is deprecated
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
   workgroup = MSHOME
   server string = Samba Server %v
   interfaces = lo, wlan0
   bind interfaces only = Yes
   security = SHARE
   log file = /var/log/samba/log.%m
   max log size = 50
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   local master = No
   dns proxy = No
   idmap config * : backend = tdb
   hosts allow = 192.168.1.9, 127.0.0.1
   hosts deny = 0.0.0.0/0

[homes]
   comment = Home Directories
   read only = No
   browseable = No

[printers]
   comment = All Printers
   path = /var/spool/samba
   printable = Yes
   print ok = Yes
   browseable = No

[public]
   comment = Public Stuff
   path = /home/samba/public
   write list = @staff
   read only = No
   create mask = 0766
   guest ok = Yes


I guess this is OK as I didn't get any error messages.

Code:


IgorReinCloud linux # smbclient -L localhost
WARNING: The security=share option is deprecated
Enter root's password:
Connection to localhost failed (Error NT_STATUS_CONNECTION_REFUSED)


Ok, so now I need to look at the log file.

Code:


IgorReinCloud samba # ls -la
total 28
drwxr-xr-x  3 root root 4096 May 27 01:44 .
drwxr-xr-x 10 root root 4096 May 26 18:12 ..
-rw-r--r--  1 root root    0 May 27 01:44 .keep_net-fs_samba-0
drwx------  4 root root 4096 Apr 17 22:40 cores
-rw-r--r--  1 root root  111 Apr 17 22:40 log.127.0.0.1
-rw-r--r--  1 root root    0 Apr 17 22:51 log.192.168.1.9
-rw-r--r--  1 root root    0 Apr 17 23:26 log.igorreincloud
-rw-r--r--  1 root root 1555 Apr 18 01:51 log.nmbd
-rw-r--r--  1 root root 4607 Apr 18 02:02 log.smbd
IgorReinCloud samba # date   
Tue May 27 02:25:21 PDT 2014


No log file is created. Which means that samba really didn't start.

Also just to finish the instructions:

Code:

IgorReinCloud linux # mount -t cifs -o username=root,password=wasqra /home/samba/public /mnt/samba
mount.cifs: bad UNC (/home/samba/public)


This error I completely don't understand. I'm trying to mount my samba public directory to the mountpoint, but it comes back wrong?

So what am I doing wrong?

Basically I'm trying to have access to my Gentoo machine from the Windows machine. I don't need any printing. Just reading some files.

If you need more info, just let me know.

Thank you for any hints/pointers.


Last edited by ONEEYEMAN on Fri Jul 25, 2014 6:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1486
Location: Oranienburg/Germany

PostPosted: Tue May 27, 2014 9:36 am    Post subject: Reply with quote

Hi,

you should modify in /etc/rc.conf the following entry to this:

Code:

rc_hotplug="!net.*"


Samba should start now, although no netdevice is started.

bb
_________________
1st: i5-4440, 16GB, 1,75TB
2nd: Celeron E3400, 2GB, 500GB
3rd: Athlon II X2 215, 8GB, 7TB
4th: Samung N350, 2GB, 250GB
5th: Rasperry Pi, 512MB, 4GB USB + NFS
6th: Cubietruck, 2GB, 8GB NAND + NFS
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2113

PostPosted: Tue May 27, 2014 9:40 am    Post subject: Reply with quote

Hi,
bbgermany wrote:

Hi,

you should modify in /etc/rc.conf the following entry to this:

Code:

rc_hotplug="!net.*"


Samba should start now, although no netdevice is started.

bb

Is there any implications to this?
Does this mean I will have to start network interfaces manually?

Thank you.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2113

PostPosted: Tue May 27, 2014 9:52 am    Post subject: Reply with quote

OK, I made that change and rebooted.
Everything seems to be started from the network POV, but I see following at the end of my boot-up screen:

Code:

WARNING: net.wlan0 has started, but is inactive
WARNING: netmount is scheduled to start when net.eth0, net.wlan0 has started
WARNING: samba is scheduled to start when net.eth0, net.wlan0 has started
Starting locals


and it actually means I killed my Internet connection.
I can't access the Web anymore. Typing this from different machine.

Any idea?

Thank you.
Back to top
View user's profile Send private message
Logicien
l33t
l33t


Joined: 16 Sep 2005
Posts: 865
Location: Montréal

PostPosted: Tue May 27, 2014 11:11 am    Post subject: Reply with quote

Code:
WARNING: net.wlan0 has started, but is inactive

This do not affect connexion status. You can check it with
Code:
rc-service net.wlan0 status

Code:
WARNING: netmount is scheduled to start when net.eth0, net.wlan0 has started

If you only want Samba share through the network, you can disable netmount with the rc-update command.

Is net.eth0 and net.wlan0 are set to start at boot time? One thing I do is to set my network devices start in the boot runlevel and Samba start in the default runlevel.
Code:
rc-update add net.eth0 boot
rc-update add net.wlan0 boot
rc-update add samba default

This way at boot time, all the network connexions are already started when Samba start.

If you want no password for Samba clients you can set this in the [global] section of smb.conf

Code:
[global]
...
map to guest = Bad User
security = user
guest account = nobody
...

To mount your samba share from a remote Linux machine, in /etc/fstab
Code:
//MSHOME/public /mnt/samba cifs noauto,password=,rw 0 0

MSHOME must have an Ip address as domain name in /etc/hosts, or you have to replace MSHOME with the real IP address where Samba listen to connexions in fstab. Than
Code:
mount /mnt/samba

_________________
Paul
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2113

PostPosted: Tue May 27, 2014 8:43 pm    Post subject: Reply with quote

Hi,
Logicien wrote:

Code:

WARNING: net.wlan0 has started, but is inactive

This do not affect connexion status. You can check it with
Code:

rc-service net.wlan0 status



Code:

#rc-service net.wlan0 status
 * status: inactive

Therefore I don't have connection.

Logicien wrote:

Code:

WARNING: netmount is scheduled to start when net.eth0, net.wlan0 has started

If you only want Samba share through the network, you can disable netmount with the rc-update command.


Yes, LAN only. Not accessible to outside world.
But netmount is something that was here before Samba installation. And I prefer not touch something that worked. ;-)

Logicien wrote:

Is net.eth0 and net.wlan0 are set to start at boot time? One thing I do is to set my network devices start in the boot runlevel and Samba start in the default runlevel.
Code:

rc-update add net.eth0 boot
rc-update add net.wlan0 boot
rc-update add samba default

This way at boot time, all the network connexions are already started when Samba start.


Ok. One question though.
I'm doing it on a laptop where I have ifplugd daemon installed to manage wired connection. Will it work in this case?
Also what are the implications of this? I mean will there be any issues?

Logicien wrote:

If you want no password for Samba clients you can set this in the [global] section of smb.conf

Code:

[global]
...
map to guest = Bad User
security = user
guest account = nobody
...

To mount your samba share from a remote Linux machine, in /etc/fstab
Code:

//MSHOME/public /mnt/samba cifs noauto,password=,rw 0 0

MSHOME must have an Ip address as domain name in /etc/hosts, or you have to replace MSHOME with the real IP address where Samba listen to connexions in fstab. Than
Code:

mount /mnt/samba



Well I'm going to use samba from the WinXP machine, not different *nix one.
And I do want to have a password to access this machine.

Also one thing I didn't find on that WiKi page is: where to define a user that will access the samba share?

Thank you.

[EDIT]
Also, for some reason with this change, wicd daemon fails to stop.
When I reboot the machine it tries to be stopped for some time and then tells that there is a failure.
[/EDIT]
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1486
Location: Oranienburg/Germany

PostPosted: Wed May 28, 2014 5:22 am    Post subject: Reply with quote

Hi,

Logicien wrote:

Is net.eth0 and net.wlan0 are set to start at boot time? One thing I do is to set my network devices start in the boot runlevel and Samba start in the default runlevel.
Code:
rc-update add net.eth0 boot
rc-update add net.wlan0 boot
rc-update add samba default

This way at boot time, all the network connexions are already started when Samba start.


I dont think, thats a good idea. IIRC the netscripts belong to the default runlevel as well. Usually, if you set
Code:
rc_hotplug="!net.*"
, the normal services should start without issues. According to wireless: this is a topic for itself. I had a lot issues get this running well. I also get the message
Code:
WARNING: net.wlan0 has started, but is inactive
But after a few seconds the net device is connected. This message occures, cause the net.wlan0 script needs to call wpa_supplicant first, before dhcp or a static address can be assinged to the device.

Make sure your wpa_supplicant.conf is setup correctly and that you are able to connect to your access point/router.

For netmount: this mounts networkfilesystems added in /etc/fstab like nfs shares or samba shares. This needs a running net connection before it can mount anything.

greets, bb
_________________
1st: i5-4440, 16GB, 1,75TB
2nd: Celeron E3400, 2GB, 500GB
3rd: Athlon II X2 215, 8GB, 7TB
4th: Samung N350, 2GB, 250GB
5th: Rasperry Pi, 512MB, 4GB USB + NFS
6th: Cubietruck, 2GB, 8GB NAND + NFS
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2113

PostPosted: Wed May 28, 2014 5:59 am    Post subject: Reply with quote

Hi,
bbgermany wrote:

Hi,

Logicien wrote:

Is net.eth0 and net.wlan0 are set to start at boot time? One thing I do is to set my network devices start in the boot runlevel and Samba start in the default runlevel.
Code:

rc-update add net.eth0 boot
rc-update add net.wlan0 boot
rc-update add samba default

This way at boot time, all the network connexions are already started when Samba start.


I dont think, thats a good idea. IIRC the netscripts belong to the default runlevel as well. Usually, if you set
Code:
rc_hotplug="!net.*"
, the normal services should start without issues. According to wireless: this is a topic for itself. I had a lot issues get this running well. I also get the message
Code:
WARNING: net.wlan0 has started, but is inactive
But after a few seconds the net device is connected. This message occures, cause the net.wlan0 script needs to call wpa_supplicant first, before dhcp or a static address can be assinged to the device.

Well, yes. That's why I didn't do it yet and wanted to confirm it is a good idea.

bbgermany wrote:

Make sure your wpa_supplicant.conf is setup correctly and that you are able to connect to your access point/router.


Yes, wpa_supplicant.conf set up properly and without the "rc_hotplug" change, I get connection.

bbgermany wrote:

For netmount: this mounts networkfilesystems added in /etc/fstab like nfs shares or samba shares. This needs a running net connection before it can mount anything.

greets, bb

I could post (type) my wpa_supplicant.conf, but it was working without "rc_hotplug" change, so I assume everything is OK.

What else I can look at/check?

Thank you.
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1486
Location: Oranienburg/Germany

PostPosted: Wed May 28, 2014 6:15 am    Post subject: Reply with quote

Hi,

can you post your wpa_supplicant.conf and your /etc/conf.d/net please?

I think it could be a very little config issue in your case :)

Greets, bb
_________________
1st: i5-4440, 16GB, 1,75TB
2nd: Celeron E3400, 2GB, 500GB
3rd: Athlon II X2 215, 8GB, 7TB
4th: Samung N350, 2GB, 250GB
5th: Rasperry Pi, 512MB, 4GB USB + NFS
6th: Cubietruck, 2GB, 8GB NAND + NFS
Back to top
View user's profile Send private message
Logicien
l33t
l33t


Joined: 16 Sep 2005
Posts: 865
Location: Montréal

PostPosted: Wed May 28, 2014 3:50 pm    Post subject: Reply with quote

bbgermany,

reading /etc/rc.conf, it say that the boot runlevel allow hotplugging. So, put a net service in that runlevel is good for hotplugging. To allow a service to be hotplugged, you just name it without the prefix ! . The ! disable the hotplug possibility of a service. So,
Code:
rc-hotplug="net.*"

will allow all net services like net.eth0, net.lo, net.wlan0, etc, to be hotplugged.
Code:
rc-hotplug="!net.*"

will disable the hotplug fonctionnality for those services. This is what I understand from the rc.conf explanation of rc-hotplug variable.
Code:
# rc_hotplug is a list of services that we allow to be hotplugged.
# By default we do not allow hotplugging.
# A hotplugged service is one started by a dynamic dev manager when a matching
# hardware device is found.
# This service is intrinsically included in the boot runlevel.
# To disable services, prefix with a !
# Example - rc_hotplug="net.wlan !net.*"
# This allows net.wlan and any service not matching net.* to be plugged.
# Example - rc_hotplug="*"
# This allows all services to be hotplugged
#rc_hotplug="*"

But you are right when you say that the net services can be start from the default runlevel, because the dependancies between scripts are always verify by Openrc. Dependancies are than executed in a logical order to make all enabled scripts start successfully, no matter the runlevel they are in.

ONEEYEMAN,

if you use ifplugd for the wire eth0 connexion, it may replace the net.eth0 script. All is about a good configuration of ifplugd and net.eth0 that will not duplicate and/or conflict each service. The configuration of /etc/rc.conf, ifplugd, /etc/conf.d/net and the enabled boot scripts have to be verified.
_________________
Paul
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2113

PostPosted: Thu May 29, 2014 3:55 am    Post subject: Reply with quote

Hi,
bbgermany wrote:

Hi,

can you post your wpa_supplicant.conf and your /etc/conf.d/net please?

I think it could be a very little config issue in your case :)

Greets, bb


[code]
/etc/conf.d/net

# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /usr/share/doc/openrc/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).


/etc/wpa_supplicant/wpa_supplicant

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1
network={
ssid="<MyNetwork>"
proto=WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
psk=<MySecretPasswordHash>
priority=5
}

I also use wicd daemon to manage wireless connection inside GNOME.

Thank you.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2113

PostPosted: Fri May 30, 2014 4:22 am    Post subject: Reply with quote

Anybody?

Thank you.
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1486
Location: Oranienburg/Germany

PostPosted: Fri May 30, 2014 5:48 am    Post subject: Reply with quote

ONEEYEMAN wrote:
Anybody?

Thank you.


Hi,

Sorry, i wasnt able to check the config in detail up to now. We had a day off yesterday... ;)

The configs look good. Does /var/log/messages contain any entry towards your net connection when booting?

@Logicien

You understood this correct. In this case, it also helps starting services, which sometimes depend on a working netdevice, before the device is up. Thats how I understood this in the past.

Greets bb

EDIT: I maybe found a little "dirty" workaround: Since /etc/init.d/samba contains the line "need net" you can add net.lo to your default runlevel. This will provide a working loopback connection with a started net device. iirc i did this in the past as well... :)
_________________
1st: i5-4440, 16GB, 1,75TB
2nd: Celeron E3400, 2GB, 500GB
3rd: Athlon II X2 215, 8GB, 7TB
4th: Samung N350, 2GB, 250GB
5th: Rasperry Pi, 512MB, 4GB USB + NFS
6th: Cubietruck, 2GB, 8GB NAND + NFS
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2113

PostPosted: Fri May 30, 2014 7:41 am    Post subject: Reply with quote

bbgermany wrote:

ONEEYEMAN wrote:

Anybody?

Thank you.


Hi,

Sorry, i wasnt able to check the config in detail up to now. We had a day off yesterday... ;)


That's OK. I just wanted to make sure everything is good.

bbgermany wrote:

The configs look good. Does /var/log/messages contain any entry towards your net connection when booting?


This file is huge. What am I looking for? I can grep it for some specidic line...

bbgermany wrote:

@Logicien

You understood this correct. In this case, it also helps starting services, which sometimes depend on a working netdevice, before the device is up. Thats how I understood this in the past.


So is it safe to put them in the boot level?

bbgermany wrote:

Greets bb

EDIT: I maybe found a little "dirty" workaround: Since /etc/init.d/samba contains the line "need net" you can add net.lo to your default runlevel. This will provide a working loopback connection with a started net device. iirc i did this in the past as well... :)


Well net.lo is started at the "boot" level. Should I move it to default?

Thank you.
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1486
Location: Oranienburg/Germany

PostPosted: Fri May 30, 2014 8:09 am    Post subject: Reply with quote

Hi,

just check the messages files for errors, you dont need to post the whole file. by default my net.lo script was in no runlevel. you could try putting it into default instead of boot. i would always put net scripts into default not boot. i think there would be missing dependecies, if they start at boot.

bb
_________________
1st: i5-4440, 16GB, 1,75TB
2nd: Celeron E3400, 2GB, 500GB
3rd: Athlon II X2 215, 8GB, 7TB
4th: Samung N350, 2GB, 250GB
5th: Rasperry Pi, 512MB, 4GB USB + NFS
6th: Cubietruck, 2GB, 8GB NAND + NFS
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2113

PostPosted: Fri May 30, 2014 9:09 am    Post subject: Reply with quote

Hi,
bbgermany wrote:

Hi,

just check the messages files for errors, you dont need to post the whole file. by default my net.lo script was in no runlevel. you could try putting it into default instead of boot. i would always put net scripts into default not boot. i think there would be missing dependecies, if they start at boot.

bb


I'm using ath9k wireless driver and there is nothing in either /var/log/messages, nor /var/log/messages.0 that relates to the connection failure.
Maybe I need to turn on debugging in the kernel?

Thank you.
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1486
Location: Oranienburg/Germany

PostPosted: Fri May 30, 2014 9:27 am    Post subject: Reply with quote

ONEEYEMAN wrote:
Hi,

I'm using ath9k wireless driver and there is nothing in either /var/log/messages, nor /var/log/messages.0 that relates to the connection failure.
Maybe I need to turn on debugging in the kernel?

Thank you.


Nope, you dont need to turn on debugging, as long as you get a connection with your wireless card. Have you tried net.lo in runlevel default? Is samba still not starting?

Greets, bb

EDIT: Do you have an entry in /etc/rc.conf like the following?

Code:
rc_depend_strict="NO"


If it is set to yes, set it to no.
_________________
1st: i5-4440, 16GB, 1,75TB
2nd: Celeron E3400, 2GB, 500GB
3rd: Athlon II X2 215, 8GB, 7TB
4th: Samung N350, 2GB, 250GB
5th: Rasperry Pi, 512MB, 4GB USB + NFS
6th: Cubietruck, 2GB, 8GB NAND + NFS
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2113

PostPosted: Fri May 30, 2014 10:15 am    Post subject: Reply with quote

bbgermany wrote:

[quote="ONEEYEMAN"
]Hi,

I'm using ath9k wireless driver and there is nothing in either /var/log/messages, nor /var/log/messages.0 that relates to the connection failure.
Maybe I need to turn on debugging in the kernel?

Thank you.


Nope, you dont need to turn on debugging, as long as you get a connection with your wireless card. Have you tried net.lo in runlevel default? Is samba still not starting?

Greets, bb

EDIT: Do you have an entry in /etc/rc.conf like the following?

Code:

rc_depend_strict="NO"


If it is set to yes, set it to no.
[/quote]

That entry was commented out and I think the default value was "YES".
I uncommented it and set it to "NO".

That doesn't change anything.
Both eth0 and wlan0 are inactive on reboot and after that samba is trying to start but failing to do so since there is no network.

Its getting late here.
Talk to you in the morning.

Thank you.
Back to top
View user's profile Send private message
Logicien
l33t
l33t


Joined: 16 Sep 2005
Posts: 865
Location: Montréal

PostPosted: Fri May 30, 2014 1:19 pm    Post subject: Reply with quote

The script loopback in the boot runlevel take care of activating the loopblack interface lo at boot time. There's no need to put the net.lo script in any runlevel for that.

ONEEYEMAN,

your problem is a network one for the moment. Show us the output of
Code:
rc-update show

and the contain of the /etc/conf.d/net file. These are the keys for network help.
_________________
Paul
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2113

PostPosted: Fri May 30, 2014 8:42 pm    Post subject: Reply with quote

Hi,
Result of "rc-update show" below:

Code:

                acpid | battery      default                 
            alsasound |              default                 
             bootmisc |         boot                         
                 dbus |              default                 
                dcron | battery      default                 
                devfs |                               sysinit
                dmesg |                               sysinit
                 fsck |         boot                         
             hostname |         boot                         
              hwclock |         boot                         
              keymaps |         boot                         
            killprocs |                      shutdown       
          laptop_mode |              default                 
                local | battery      default                 
           localmount |         boot                         
              modules |         boot                         
             mount-ro |                      shutdown       
                 mtab |         boot                         
                mysql | battery      default                 
             net.eth0 | battery      default                 
               net.lo |         boot                         
            net.wlan0 |              default                 
             netmount | battery      default                 
               procfs |         boot                         
                 root |         boot                         
                samba |              default                 
            savecache |                      shutdown       
                 swap |         boot                         
            swapfiles |         boot                         
               sysctl |         boot                         
                sysfs |                               sysinit
             sysklogd | battery      default                 
         termencoding |         boot                         
       tmpfiles.setup |         boot                         
                 udev |                               sysinit
           udev-mount |                               sysinit
              urandom |         boot                         
                 wicd |         boot                         


/etc/conf.d/net was posted before.

Thank you.
Back to top
View user's profile Send private message
Logicien
l33t
l33t


Joined: 16 Sep 2005
Posts: 865
Location: Montréal

PostPosted: Sat May 31, 2014 3:38 am    Post subject: Reply with quote

My friend, /etc/conf.d/net contain only comments. In that case, Openrc make a dhcp request on the interfaces net.eth0 and net.wlan0. It's often good for a wire network connexion, but generally not enough for a wireless one.

If you have to connect to an Access Point, you probably want wpa_supplicant to establish the connexion before any dhcp request. Here is the importance of configure /etc/conf.d/net. The example from the mine look like this
Code:
config_wlan0="dhcp"
dhclient_wlan0="-v"
modules_wlan0="dhclient !dhcpcd iproute2 iwconfig wireless wpa_supplicant"
wpa_supplicant_wlan0="-D nl80211 -dd -f /var/log/wpa.log -t"

It will work if /etc/wpa_supplicant/wpa_supplicant.conf is occurate, what it look.

Using Openrc to manage your wire net.eth0 and wireless net.wlan0 connexions mean that you do not need Wicd for those. Wicd should be disabled for the moment
Code:
rc-service wicd stop
rc-update del wicd default

unless you really want to use it. The same way, you should disable ifplugd until you get connected by net.eth0 and net.wlan0.

To advoid conflicts, I never allow two or more applications do the same thing at the same time on the same interface. It's specially true when you cannot connect and stay true after too.

If this do not work, you can try the manual method again.

Your boot scripts proccess look good.
_________________
Paul
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2113

PostPosted: Sat May 31, 2014 3:56 am    Post subject: Reply with quote

Logicien,
So basically what I will do by removing wicd and ifplugd is start from scratch making sure I can run the network and samba, correct?
Now, what I wonder is how come everything worked before and now after changing hotplug option everything stopped working?

Thank you.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2113

PostPosted: Sun Jun 01, 2014 7:39 am    Post subject: Reply with quote

Logicien,
Also, why do you have so much stuff in that file?

Looking at Handbook, it only have 2 small options there...

Thank you.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2113

PostPosted: Sun Jun 01, 2014 7:57 am    Post subject: Reply with quote

OK, this is really weird.
I have ath9k as a wireless driver.

Before I started playing with all this everything worked.
Now I modified /etc/conf.d/net to read like this:

Code:

modules="wpa_supplicant"
wpa_supplicant_wlan0="-Dath9k -dd -f /var/log/wpa.log -c/etc/wpa_supplicant/wpa_supplicant.conf -t"


And I got following error during the boot:

Code:

 * Starting wpa_cli on wlan0
Failed to connect to wpa_supplicant - wpa_ctrl_open: no such file or directory
 * start-stop-daemon: failed to start `/usr/bin/wpa_cli`
 * start-stop-daemon: fopen `/var/run/wpa_supplicant-wlan0.pid`: No such file or directory
 * ERROR: net.wlan0 failed to start


Then I opened another terminal as root and typed this:

Code:

wpa_supplicant -Dath9k -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf


and the output was:

Code:

Unsupported driver 'ath9k'


I don't understand this at all.
I don't have wireless-tools installed at all, but just running wpa_supplicant fails with this error? How come it was working before?

Thank you.
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1486
Location: Oranienburg/Germany

PostPosted: Mon Jun 02, 2014 7:25 am    Post subject: Reply with quote

Hi,

ath9k is not correct for the command line of wpa_supplicant. Either try "-Dwext" or "-Dnl80211"

bb
_________________
1st: i5-4440, 16GB, 1,75TB
2nd: Celeron E3400, 2GB, 500GB
3rd: Athlon II X2 215, 8GB, 7TB
4th: Samung N350, 2GB, 250GB
5th: Rasperry Pi, 512MB, 4GB USB + NFS
6th: Cubietruck, 2GB, 8GB NAND + NFS
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum