Samba and SMB and Ubuntu

So i don't know what im doing wrong but SAMBA just never seems to work for me.

The apps crash all the time or don't start up at all. anyelse experience enormous issues with windows file sharing under linux with samba and ubuntu ?

in other news anyone know of a good quick start guide or video for NFS file sharing for linux to linux?

remilafo

Are you trying to execute apps through the windows network on another machine?

yeah so alot more detail is needed.

Okay i have three computers.
192.168.0.1 -> windows 8.1
192.168.0.2 -> windows 8.1
192.168.0.3 -> Ubuntu 14.10

I have network shares setup on both windows machine and i know they work because i share stuff back and forth without issue. I have secured it so that only one particular userid can move stuff around.

WHen ubuntu was first installed it did see the windows shares from the windows machine which was good but i tried to setup windows share from the ubuntu machine and now nothing works.

Here is what i did..
from the Ubuntu software center, i installed Samba (which never opened and crashed on load), then smb4k and Gadmin-samba. Smb4k worked once and hasn't since.

Going to file browser under network the shares that used to be there cannot be seen anymore.

here is my ifconfig
th0 Link encap:Ethernet HWaddr 08:00:27:ca:7a:59
inet addr:192.168.43.190 Bcast:192.168.43.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:feca:7a59/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12551 errors:0 dropped:0 overruns:0 frame:0
TX packets:10715 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12142620 (12.1 MB) TX bytes:1529035 (1.5 MB)

eth1 Link encap:Ethernet HWaddr 08:00:27:f9:4c:1e
inet addr:192.168.0.3 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fef9:4c1e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:192 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:28223 (28.2 KB)

can't i just do a `92.168.0.2 from linux somehow like in windows?
How do i create samba/windows shares from ubuntu? (folder properties and sharing crashes the file browser and samba app doesn't open up)

PS. i just want to say that as a windows power user and being able to share files over lan in like 30 seconds and not being able to do so on linux is kinda deal breaker toward making a linux switch. Frustrating.

more information:

heres what i get when i try to run

[email protected]:~$ sudo system-config-samba

Traceback (most recent call last):
File "/usr/sbin/system-config-samba", line 45, in
mainWindow.MainWindow(debug_flag)
File "/usr/share/system-config-samba/mainWindow.py", line 116, in init
self.samba_user_data = sambaUserData.SambaUserData(self)
File "/usr/share/system-config-samba/sambaUserData.py", line 46, in init
self.readSmbPasswords()
File "/usr/share/system-config-samba/sambaUserData.py", line 63, in readSmbPasswords
raise RuntimeError, (_("You do not have permission to execute %s." % pdbeditcmd))
RuntimeError: You do not have permission to execute /usr/bin/pdbedit.

The samba app crashing is not a very good sign. I would try and purge what you have installed.
If you could see the windows shares in ubuntu and use them then you did not have to install anything extra. Samba was already there and working. The only thing you needed to do if you wanted an Ubuntu folder to be shared to the windows machines was to modify the folder properties to create the share and make a samba password from the terminal like so in step 2.

https://help.ubuntu.com/community/How%20to%20Create%20a%20Network%20Share%20Via%20Samba%20Via%20CLI%20%28Command-line%20interface/Linux%20Terminal%29%20-%20Uncomplicated,%20Simple%20and%20Brief%20Way!.

Also do you have the firewall enabled in ubuntu? If you enabled it and then the shares disappeared then thats your problem. If yes the you have to create a rule to allow samba through the firewall (better install a gui app like gufw from the software centre and do it through there).

You are trying to share a windows LAN to another OS. If you had only Linux machines you would not have that issue.
A windows network is a closed system. It was not designed to be used by other OS. That is why samba was created. So any complains should go towards Microsoft.

I get the frustration but learning to use new tools takes some time and effort inevitably. You did not become a power user on windows in a day did you? So keep at it.

thank for the link, i am working on it.

in regard to your comment. No i did not become a windows power user in 1 day but cross-OS network file sharing shouldn't be this difficult ever! .. I don't want to start a flame war but i can share to windows from a mac in 30 seconds as well. And from windows to a mac with the DL of 1 app in 2min.

i am hoping that linux to linux is easier as this is my choosen next topic after the samba file sharing, crossing my finger that it is easier.

remi

Dude, please please please surround your terminal output with triple tildes... makes it so much easier to read. Help us help you:

```
terminal output
```

E.g.:

docker0   Link encap:Ethernet  HWaddr 56:84:7a:fe:97:99  
          inet addr:172.17.42.1  Bcast:0.0.0.0  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

The Linux way to do this is: smb:///192.168.0.2

The easy way to set up a Samba share on Ubuntu is to just right click on the folder and click on local network share. For this to work with a user name and password you have to add a Samba user.

sudo smbpasswd -a username

From reading your posts it sounds like this isn't working and nautilus is crashing, but you didn't say if that was before or after you tried other things. If it was crashing before then I don't know what the problem is without more info. If it was after I would have to ask if you changed your smb.conf, or one of the programs you installed changed the smb.conf. If you don't know there should be a copy of the default in /usr/share/samba, that you can copy over and see if anything changes.

sudo cp /usr/share/samba/smb.conf /etc/samba/smb.conf

Then if you have your firewall enabled you have to allow Samba for the other machines to connect.

sudo ufw allow samba

For solutions to NFS shares, there is no better source than searching/asking on the Ubuntu forums, though there are any number of videos on Youtube on that subject.

Regarding Samba, I've always found it to be reliable, whether it's Linux to Linux or Linux to Windows. As previously recommended on other posts, may I suggest the The Urban Penguin (TUP).

Link: http://theurbanpenguin.com

Here's a direct link to the video that should help to resolve your sharing issues. This solution will involve using the terminal. TUP uses vi, but you can use the editor of your choice and achieve the same results.

Link: http://theurbanpenguin.com/wp/?s=Samba+-+windows

i feel the love...

i know the stereotype is that linux community sucks but the tek syndicate linux community is pretty cool..

Only Rddit and the chans suck. Go to most distro forums or phoronix they are pretty chill there.

[SOLVED]

Was alot of work but, i eventually got read/write windows sharing both ways.

i had to apt-get purge "everything samba related" first
sudo rm -r /etc/samba

-reinstall samba
sudo mkdir /etc/samba
sudo cp /usr/share/samba/smb.conf /etc/samba/smb.conf

then this guide helped tons
https://help.ubuntu.com/community/How%20to%20Create%20a%20Network%20Share%20Via%20Samba%20Via%20CLI%20%28Command-line%20interface/Linux%20Terminal%29%20-%20Uncomplicated%2C%20Simple%20and%20Brief%20Way!

with the help of this command pdbedit

works now.. thanks all

1 Like