[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to set up samba server on a new server

Posted on 2013-06-03
12
Medium Priority
?
495 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 2000 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 2000 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month18 days, 21 hours left to enroll

834 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