1

I installed ubuntu server with samba step-by-step with this tutorial: https://www.youtube.com/watch?v=ndAYZ0DJ-U4.

I used samba on ubuntu server 14.04 for two days. Everything was fine, all my devices connected on network can access this server without problem. Then I move some files to server about 80GB. I can access this data from all devices. Then I shutdown server and change some router setting like password and coding (from tkip to aes).

When I wanted to start server again this shows up:

waiting for network configuration

followed by:

waiting an additional 60 seconds for network configuration

Since that happened no device can see server in network.

I tried to edit network interface:

sudo nano /etc/network/interfaces

Restore it to default setting and back to static ip again. After this changes I do not see the error message no more. But nothing else.

I checked samba config and restarted all services. - not helped

Please help.

  • I tried to reinstall samba, when I want to install it back I find out my server cant connect to internet. This information may be important. – Simi Feb 21 '17 at 19:39
1

I am using samba server in home network as mentioned below. If it stopped working you can try reinstalling it but most probably problem is in router settings. If you don't know what you changed in it then you have to reset it.

Install and Remove from the Terminal : (Using Samba Version 4.3.11)


sudo apt-get remove --purge samba

But, if you are having client problems, it would be more like:

sudo apt-get remove --purge smbclient libsmbclient

sudo apt-get purge samba samba-common
sudo rm -rf /etc/samba/ /etc/default/samba

To install it again

sudo apt-get install samba
sudo apt-get install smbclient libsmbclient

How to Reinstall smb.conf in other way

dpkg-reconfigure samba-common
or
sudo cp -a /usr/share/samba/smb.conf /etc/samba/

Restart Ubuntu after fresh installation and add user


root@Dell-Inspiron-3521:~# sudo smbpasswd -a username (username should be without space eg "sudo smbpasswd -a alamjitsingh")
New SMB password:
Retype new SMB password:*********
Added user alamjitsingh.*********

smb.conf required settings


sudo gedit /usr/share/samba/smb.conf


[global]
 workgroup = WORKGROUP
 passdb backend = tdbsam 
 security = user 

In authentication section turn "map to guest = bad user" off by adding # at starting of code

#map to guest = bad user

Below line is Optional if not working

force user = alamjitsingh

At last add your personal code

[Shared_drive_Name]
path = /media/alamjitsingh/Shared_drive_Name (alamjitsingh is my ubuntu username)
comment = HD Share
read only = yes
available = yes
browseable = yes
writable = no
guest ok = no
public = yes
printable = no
locking = no
strict locking = no

Useful Terminal commands

sudo service samba reload 
sudo service samba restar
sudo service samba stop
sudo service samba start
sudo service samba status
sudo service samba force-reload

Or

sudo /etc/init.d/smbd start
sudo /etc/init.d/smbd stop
sudo /etc/init.d/smbd restart

sudo testparm

sudo service nmbd start
sudo service smbd start

Or (via systemctl)

sudo systemctl restart smbd
sudo systemctl start smbd
sudo systemctl restart nmbd
sudo systemctl start nmbd

Check status of required services

sudo service nmbd status
sudo service smbd status
sudo service smbd restart

To know version of samba

samba -V

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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