Solved

How to set up samba server on a new server

Posted on 2013-06-03
12
462 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CentOS/RHEL 7 Linux maillog worldwide readable 2 64
Centos 7 User to Start Apache, MariaDB, LDAP 5 39
su - oracle could not open session 6 75
awk variable in printf 1 25
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

773 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