LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-17-2014, 11:45 PM   #1
starblight
LQ Newbie
 
Registered: Aug 2014
Posts: 4

Rep: Reputation: Disabled
Having issues with Samba on new install


After installing a new Ubuntu 14.04 server I tried to setup samba. I got most of it to work but followed a few guilds I now think I should have skipped. After realizing I messed some settings up and not 100% sure how to reset them I figured I would uninstall samba and reinstall it. In the process of uninstalling it I removed /etc/samba/smb.conf

It seems reinstalling samba however dose not reinstall that file. So what is the best way to fix a mistake like this? I do have an almost untouched server so I could reinstall but figured trying to fix my mistakes might teach me more.

This is the first time I have ever tried to ask for help online with Linux so not sure all the information you might need. Let me know and I will do what I can to supply it.
 
Old 08-18-2014, 12:42 AM   #2
Doug G
Member
 
Registered: Jul 2013
Posts: 593

Rep: Reputation: Disabled
Easiest would probably be to reinstall samba. I don't know Ubuntu, but if it uses yum there is a yum reinstall command that will give you a fresh copy of smb.conf and you can start over.
 
Old 08-18-2014, 12:52 AM   #3
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

I think the default example smb.conf should be available at /usr/share/samba/smb.conf. You can just copy it to /etc/samba/smb.conf
See [1] for a guide on setting up samba on Debian (and therefore derivatives like Ubuntu). There may be some Ubuntu specific documentation somewhere but I'm not familiar with it (or of it's quality).

Evo2.

1. http://debian-handbook.info/browse/s...ith-samba.html
 
Old 08-18-2014, 01:45 AM   #4
S4KmBL
LQ Newbie
 
Registered: Aug 2014
Posts: 11

Rep: Reputation: Disabled
Having issues with Samba on new install

Hi!
I suppose all you have to do is:
sudo apt-get purge samba
sudo apt-get install samba.
Let us know if you succeed.
 
Old 08-18-2014, 03:01 AM   #5
starblight
LQ Newbie
 
Registered: Aug 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
First off I would like to thank all of you for your help and suggestions.

Quote:
Originally Posted by S4KmBL
I suppose all you have to do is:
sudo apt-get purge samba
sudo apt-get install samba.
Let us know if you succeed.
I tried this first even though I had tried it in the past just to make sure I had not made a simple mistake. sadly it did not work.

Quote:
Originally Posted by evo2
I think the default example smb.conf should be available at /usr/share/samba/smb.conf. You can just copy it to /etc/samba/smb.conf
See [1] for a guide on setting up samba on Debian (and therefore derivatives like Ubuntu). There may be some Ubuntu specific documentation somewhere but I'm not familiar with it (or of it's quality).

Evo2.

1. http://debian-handbook.info/browse/s...ith-samba.html
I had tried this also but after trying again I find I had much better luck. I located the smb.conf and it looks like it is intact.

I then went to copy it to the /etc/samba/ folder.... I should have said this before but in all my brilliance I had tried to delete the /etc/samaba folder when purge did not get ride of it... I am racking my brain and I am mostly confident that is all I deleted.

Is there still hope?
 
Old 08-18-2014, 03:27 AM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

the directories under /etc/samba belong to the samba-common package. So, reinstall it. Eg
Code:
sudo apt-get install --reinstall samba-common
dlocate or apt-file would have told you which package needed to be reinstalled.

Evo2.
 
Old 08-18-2014, 04:01 AM   #7
starblight
LQ Newbie
 
Registered: Aug 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
thanks Evo2. it looks like it worked. I am out of time though and will be out of town for a week will give an update on results when I get back.
 
Old 08-25-2014, 01:31 AM   #8
starblight
LQ Newbie
 
Registered: Aug 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
I am back in town and have time to pick this back up.

Current status

I now have a folder /etc/samba that contains dhcp.conf and smb.conf
If I recall correctly I am missing two files? Not sure what or if they are needed.

I then read the link and followed the instructions

I first tried SWAT but as expected it did not work.

I then ran dpkg-reconfigure samba-common samba and answered the questions presented. Out of the 4 questions listed in the instructions it only asked about workgroup and DHCP not sure if that is bad or not.


I then edited smb.conf

on step 2 of the instructions I could not find "security = user" under ####### Authentication #######

I skipped the steps about printers as I am not using it.

I then added a shared directory

[Files]
comment = Files
path = /var/share/Files
browseable = yes
read only = no
guest ok = yes

and

[group1]
comment = group1
path = /var/share/group1
browseable = yes
read only = no
guest ok = no

Files should be accessible by anyone group1 should be accessible only be people in the group (will ask how at the end)

I then made sure my users were still made by adduser username and they were and made sure my samba useres were still there with smbpasswd -a user no problems found there.

I rebooted the server next and checked to make the files was accessible and it was.

So unless some of my concerns are real I think I am back to working. This also brings me back to how I broke it in the first place. While trying to figure out how to give and take away access to users. should I ask that in this post or start a new one?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba issues Strax Linux - Server 3 08-17-2013 09:46 PM
Possible Samba Issues Woodsman Slackware 2 10-30-2006 04:41 PM
Samba and XP issues scrupul0us Slackware 11 01-07-2006 10:55 AM
samba install issues fester2001 Debian 2 04-12-2005 01:50 AM
samba issues cham0169 Linux - Software 1 04-11-2005 09:37 AM


All times are GMT -5. The time now is 10:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration