Solved

How to set up samba server on a new server

Posted on 2013-06-03
12
472 Views
Last Modified: 2013-07-23
I have a file server which uses samba for file sharing. I got a request to move this file server to another box. After I moved the folder to the new box, I installed samba and set it up by using the old configurations. After that, i still couldn't open the folder through the link \\newserver\software to open it.

here is the file permission settings. The "shares" folder is where I put all the files for sharing.

[root@europa u1]# ls -alt
total 44
drwxr-xr-x.  4 root root  4096 Mar 29 09:56 shares
dr-xr-xr-x. 25 root root  4096 Jan 15 15:01 ..
drwxrwxr-x.  2 root root  4096 Oct 24  2012 public
drwxr-xr-x   8 root root  4096 Oct 24  2012 .
drwxr-xr-x.  4 root root  4096 Oct 17  2012 home
drwx------   2 root root 16384 Oct 17  2012 lost+found
drwxr-xr-x.  4 root root  4096 Apr 28  2011 backup
drwxrwx--x.  4 root root  4096 Mar 14  2011 tftproot

[root@europa u1]# pwd
/u1
[root@europa u1]#




[root@europa u1]# /usr/sbin/smbd status
[root@europa u1]# cd /usr/sbin/
[root@europa sbin]# ./smbd status
[root@europa sbin]# ./smbd stop
[root@europa sbin]# ./smbd start
[root@europa sbin]# ps -ef | grep smbd
root      6075  5972  0 15:14 pts/0    00:00:00 grep smbd
root     32378     1  0 Mar28 ?        00:00:00 smbd -D
root     32381 32378  0 Mar28 ?        00:00:03 smbd -D
[root@europa sbin]# ./
0
Comment
Question by:Jason Yu
  • 8
  • 4
12 Comments
 

Author Comment

by:Jason Yu
ID: 39217616
couldn't find the file for nmb service. Only one for smb service.

[root@europa shares]# cd /etc/rc.d/rc5.d
[root@europa rc5.d]# ls -alt | grep S91
lrwxrwxrwx.  1 root root   13 Oct 24  2012 S91smb -> ../init.d/smb
[root@europa rc5.d]# ls -alt | grep S91nmb
[root@europa rc5.d]#
0
 
LVL 21

Assisted Solution

by:Mazdajai
Mazdajai earned 500 total points
ID: 39217723
Do you have iptables running? What about \\ip.address\shares?  Can you post the output for netstat -ant and smb.conf?
0
 

Author Comment

by:Jason Yu
ID: 39217786
I tried to connect from my windows machine. I can use this command: "net use * \\server\share" to connect to the old Samba server, but when I issue the same command :"net use * \\server\share." to the new server, it failed with the following information .

net use * \\server\share.

.This server's clock is not synchronized with the primary domain controller's clo
ck.


I already added the new samba server successfully to the domain by using this command:

" net ads join -U jyu%password" .
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:Jason Yu
ID: 39217787
[root@europa shares]# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State  
tcp        0      0 0.0.0.0:139                 0.0.0.0:*                   LISTEN  
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN  
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN  
tcp        0      0 0.0.0.0:445                 0.0.0.0:*                   LISTEN  
tcp        0      0 0.0.0.0:48772               0.0.0.0:*                   LISTEN  
tcp        0      0 10.10.24.3:35107            10.10.4.25:389              ESTABLISHED
tcp        0     52 10.10.24.3:22               10.10.4.34:58740            ESTABLISHED
tcp        0      0 10.10.24.3:46800            10.10.4.25:1026             ESTABLISHED
tcp        0      0 10.10.24.3:45316            10.10.4.25:445              ESTABLISHED
tcp        0      0 :::139                      :::*                        LISTEN  
tcp        0      0 :::111                      :::*                        LISTEN  
tcp        0      0 :::22                       :::*                        LISTEN  
tcp        0      0 :::445                      :::*                        LISTEN  
tcp        0      0 :::46046                    :::*                        LISTEN  
[root@europa shares]#
0
 

Author Comment

by:Jason Yu
ID: 39217794
Here is the config file.
smbconfig.txt
0
 
LVL 21

Accepted Solution

by:
Mazdajai earned 500 total points
ID: 39239158
Have you check ntp is running and sync'ing the time correctly with the peers?

Also check the following -
iptables is NOT running.
SELinux is NOT running.
0
 

Author Comment

by:Jason Yu
ID: 39242255
how to check ntp is running on the server?

I don't know why the ntp  relates the file sharing function.

iptables is not running
SELinux is not running
0
 
LVL 21

Assisted Solution

by:Mazdajai
Mazdajai earned 500 total points
ID: 39242651
What distro?

You can try -
service ntpd restart
/etc/init.d/ntpd restart

Open in new window

0
 

Author Comment

by:Jason Yu
ID: 39291763
Ip table result:


[root@europa ~]# iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           state NEW udp dpt:137
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           state NEW udp dpt:138
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           state NEW udp dpt:137
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           state NEW udp dpt:138
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:139
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:445
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:8140
REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
[root@europa ~]#
0
 

Author Comment

by:Jason Yu
ID: 39291769
when I tried to access share drive from windows machine.  It gives me system error 53.

and shows "windows cannot access \\europa\share" drive.



C:\Users\jyu>net use * \\europa\share
System error 53 has occurred.

The network path was not found.
0
 

Author Comment

by:Jason Yu
ID: 39291927
BTW, I already stopped iptables after I saw it was not.
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39299006
Do you have selinux running? Have you try \\ip\share ?
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question