• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 496
  • Last Modified:

How to set up samba server on a new server

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
Jason Yu
Asked:
Jason Yu
  • 8
  • 4
3 Solutions
 
Jason YuAuthor Commented:
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
 
MazdajaiCommented:
Do you have iptables running? What about \\ip.address\shares?  Can you post the output for netstat -ant and smb.conf?
0
 
Jason YuAuthor Commented:
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Jason YuAuthor Commented:
[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
 
Jason YuAuthor Commented:
Here is the config file.
smbconfig.txt
0
 
MazdajaiCommented:
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
 
Jason YuAuthor Commented:
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
 
MazdajaiCommented:
What distro?

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

Open in new window

0
 
Jason YuAuthor Commented:
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
 
Jason YuAuthor Commented:
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
 
Jason YuAuthor Commented:
BTW, I already stopped iptables after I saw it was not.
0
 
MazdajaiCommented:
Do you have selinux running? Have you try \\ip\share ?
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 8
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now