PDA

View Full Version : aaarghh... samba!



outsourcededm
9th January 2012, 10:50 AM
hi there,

something VERY wierd has happened that i can't figure out - hoping someone could help..

the other day i installed samba so that both my laptops and also my xbox media centre could see all the data on the network. the FC16 machine is the samba server and has all the data in accessible partitions...

after some wailing and gnashing of teeth, i finally got the windows xp laptop and the XBMC connected to the samba shares, was working wonderfully. Then, we had a power 'incident' due to some lightning and the FC16 machine rebooted itself... since then, none of the samba shares are available..??

now when i run 'smbclient -L outsourcededm -U adza' i get the following..

Connection to outsourcededm failed (Error NT_STATUS_UNSUCCESSFUL)

googling this error has not proven handy (to now).. i've been through the samba setup guide in this forum (under set-up guides) again, but still can't get it to work... ??

help!

adam

flyingfsck
9th January 2012, 10:57 AM
Hmm, I can't recall ever seeing that error code. Are you sure that the IP addresses are correct? Try to ping all the computers from all the computers.

BTW, it is far, far less hassle to get NFS to work and Windows has clients for it available for download from MS Technet somewhere.

Chilly Willy
9th January 2012, 10:59 AM
Sometimes it is as simple as rebooting ALL the machines & trying again...

Make sure that NMB is running on the linux box, on mine it has a tendency to not to at times. This will cause it NOT to work [right].

Other than that, I don't know... it sounds like you are doing it a bit different than I am. But I only have a simple setup. (1 to 2 XP & 1 to 2 linux, [all towers], depending on what I'm doing - server & share on main linux)

glennzo
9th January 2012, 11:02 AM
Are the services running now that the machine was rebooted?


[glenn@phenom16 ~>$ systemctl status smb.service
smb.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smb.service; disabled)
Active: active (running) since Mon, 09 Jan 2012 05:00:17 -0500; 4s ago
Process: 13554 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=0/SUCCESS)
Main PID: 13555 (smbd)
CGroup: name=systemd:/system/smb.service
├ 13555 /usr/sbin/smbd
└ 13557 /usr/sbin/smbd

[glenn@phenom16 ~>$ systemctl status nmb.service
nmb.service - Samba NMB Daemon
Loaded: loaded (/lib/systemd/system/nmb.service; disabled)
Active: active (running) since Mon, 09 Jan 2012 05:00:56 -0500; 1s ago
Process: 13565 ExecStart=/usr/sbin/nmbd $NMBDOPTIONS (code=exited, status=0/SUCCESS)
Main PID: 13566 (nmbd)
CGroup: name=systemd:/system/nmb.service
└ 13566 /usr/sbin/nmbd


If they're not running then:

systemctl start smb.service
systemctl start nmb.service

outsourcededm
9th January 2012, 11:15 AM
hey everyone... okay..

@glenzo yup..



adza@outsourcededm:/etc/samba$ systemctl status smb.service
smb.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smb.service; enabled)
Active: active (running) since Mon, 09 Jan 2012 20:43:56 +1100; 29min ago
Process: 7311 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=0/SUCCESS)
Main PID: 7312 (smbd)
CGroup: name=systemd:/system/smb.service
├ 7312 /usr/sbin/smbd
├ 7314 /usr/sbin/smbd
└ 7432 /usr/sbin/smbd
adza@outsourcededm:/etc/samba$ systemctl status nmb.service
nmb.service - Samba NMB Daemon
Loaded: loaded (/lib/systemd/system/nmb.service; enabled)
Active: active (running) since Mon, 09 Jan 2012 20:44:01 +1100; 29min ago
Process: 7326 ExecStart=/usr/sbin/nmbd $NMBDOPTIONS (code=exited, status=0/SUCCESS)
Main PID: 7327 (nmbd)
CGroup: name=systemd:/system/nmb.service
└ 7327 /usr/sbin/nmbd
adza@outsourcededm:/etc/samba$

@flyingfsck - i can ping everything, can even see fc16 machine over network when running \\192.168.0.12 from the run window in xp.. it asks for login then shows the samba shares.. can't connect to them however..

beaker_
9th January 2012, 12:47 PM
From outsourcededm. Paste the output of:


smbclient -L 127.0.0.1
smbclient -L 127.0.0.1-U adza
sestatus
getsebool -a |grep samba

smr54
9th January 2012, 01:54 PM
I have an old samba troubleshooting page, with links to the samba site's diagnosing problems page.
http://home.roadrunner.com/~computertaijutsu/rhsamba.html

flyingfsck
9th January 2012, 02:44 PM
OK, you can ping them so the basic networking is fine and the samba services are both running. See whether iptables is blocking things:

Clear all the rules and see whether it works:
# iptables -F

Now try smbclient again.

Chilly Willy
10th January 2012, 12:12 AM
HMMM, it seems I need to know how to set the NMB & SMB to always be in the services & active. If I boot they are NOT even listed until I manually start then in a terminal. Then they will show up & run fine. What gives?

Got it using chkconfig nmb on & chkconfig smb on
But that issue of NMB not wanting to [properly] start is still acting up & being a PITA!

flyingfsck
10th January 2012, 09:53 AM
What usually happens is that the nmb and smb services are started too early, before the underlying TCP/IP network is working, so they fail to start properly and exit.

So, you got to make a change somewhere, either by adding a 'sleep 10' in the startup script or changing the name of the startup script so that it alphabetically runs later in the startup process.

xyz
11th January 2012, 05:44 AM
I had a similar problem after switching to F16. Samba never started properly during boot, but was running fine when started manually.

The reason was that the network came up too late as described above by flyingfsck.

Enabling "NetworkManager-wait-online.service" solved this problem for me.

Just type: "systemctl enable NetworkManager-wait-online.service" and reboot

outsourcededm
11th January 2012, 10:54 AM
hey guys.. still no resolution here.. :@

@beaker outputs..

smbclient -L 127.0.0.1



Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.1-77.fc16]

Sharename Type Comment
--------- ---- -------
homes Disk Home Directories
partition1 Disk
partition2 Disk
partition3 Disk
partition4 Disk
IPC$ IPC IPC Service (Samba Server Version 3.6.1-77.fc16)
HP-Officejet-6300-series Printer HP Officejet 6300 series
adza Disk Home Directories
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.1-77.fc16]

Server Comment
--------- -------
OUTSOURCEDEDM Samba Server Version 3.6.1-77.fc16

Workgroup Master
--------- -------
MYGROUP OUTSOURCEDEDM
RAP RGANRD05296


smbclient -L 127.0.0.1 -U adza


Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.1-77.fc16]

Sharename Type Comment
--------- ---- -------
homes Disk Home Directories
partition1 Disk
partition2 Disk
partition3 Disk
partition4 Disk
IPC$ IPC IPC Service (Samba Server Version 3.6.1-77.fc16)
HP-Officejet-6300-series Printer HP Officejet 6300 series
adza Disk Home Directories
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.1-77.fc16]

Server Comment
--------- -------
OUTSOURCEDEDM Samba Server Version 3.6.1-77.fc16

Workgroup Master
--------- -------
MYGROUP OUTSOURCEDEDM
RAP RGANRD05296


sestatus


SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 26
Policy from config file: targeted

getsebool -a |grep samba



samba_create_home_dirs --> off
samba_domain_controller --> on
samba_enable_home_dirs --> on
samba_export_all_ro --> off
samba_export_all_rw --> off
samba_run_unconfined --> off
samba_share_fusefs --> off
samba_share_nfs --> off
use_samba_home_dirs --> off
virt_use_samba --> off


pulling my hair out here.. :)

lightman47
11th January 2012, 12:43 PM
just a shot in the dark - wonder if your samba Users file got clobbered/corrupted in the outage.

beaker_
11th January 2012, 01:41 PM
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.1-77.fc16]

Sharename Type Comment
--------- ---- -------
homes Disk Home Directories
partition1 Disk
partition2 Disk
partition3 Disk
partition4 Disk
IPC$ IPC IPC Service (Samba Server Version 3.6.1-77.fc16)
HP-Officejet-6300-series Printer HP Officejet 6300 series
adza Disk Home Directories
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.1-77.fc16]

Server Comment
--------- -------
OUTSOURCEDEDM Samba Server Version 3.6.1-77.fc16

Workgroup Master
--------- -------
MYGROUP OUTSOURCEDEDM
RAP RGANRD05296




samba_create_home_dirs --> off
samba_domain_controller --> on
samba_enable_home_dirs --> on
samba_export_all_ro --> off
samba_export_all_rw --> off
samba_run_unconfined --> off
samba_share_fusefs --> off
samba_share_nfs --> off
use_samba_home_dirs --> off
virt_use_samba --> off


In short. Read the selinux note at the top of your default smb.conf. Bascially SELinux will deny samba access to these directories. Unless you have applied the proper extended attribute... which I doubt.

At the terminal

su
yum install policycoreutils-gui
setsebool samba_export_all_rw on
system-config-selinux
Navigate your way to the boolean (left paine) and check "Allow samba to share any file/directory read/write" (right pane, module = samba) if it's not already.
systemctl restart smb.service
systemctl restart nmb.service
exit


Check and see if it's flying straight now.

Note. I don't know why but for some reason, beginning in F16, I always needed to check the boolean in system-config-selinux. ie., setsebool doesn't seam to do the job.