Solved

How to set up samba server on a new server

Posted on 2013-06-03
12
445 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
 

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now