LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 03-16-2015, 10:50 AM   #1
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Rep: Reputation: 19
Problem setting up samba -- Korora 21 (Fedora)


I've got my new system up and running. It's a nice fresh change after running Linux Mint for the past 4 years. Now comes the time of setting things up the way I like them.

As part of my setup, I have a all of my DVD's backed up onto my computer so that I can use a media server in the house. I run XBMC at my TV's with a central samba server (my computer) holding the movies.

In LM, all I had to do was right-click the directory "sharing" and select SMB share and type in the name. Everything else was done for me. This doesn't seem that simple.

Here's what I've done:
1. Menu > Administration > Samba
2. Entered in all the directories to share, under the BASIC tab I've selected visibile, writeable. Under the ACCESS tab I've selected a user (see below).
3. I've created a system user called xbmc with the password of xbmc.
4. I've created a samba user called xbmc with the password of xbmc.

Still not working. So, I went into the shell where I manually started the smb service:
# systemctl start smb.service

So, I went back to Menu > Administration > Samba > Preferences:
Set workgroup to WORKGROUP (but it automatically changes it to lower case after I exit).

Drop to terminal and restart service with systemctl.

I go over to my XMBC installation and try to connect to the source and it finds the SMB share. I click on it and after about 30 seconds a window pops up asking for login credentials. I enter xbmc/xbmc and after about 30 seconds it just cycles through. XMBC doesn't offer any messages, so I went downstairs to my Windows machine and tried to connect to a network drive. I enter in \\IP\share-name and after a few seconds it asks for login credentials. I enter xbmc/xbmc but then it fails with "bad username or password".

I'm not sure what I need to do to get this working.

Here is my /etc/samba/smb.conf file:
http://pastebin.com/m9ExpPJF

System Korora 21 (just installed/updated)
kernel: 3.18.9-200.fc21.x86_64
 
Old 03-16-2015, 11:07 AM   #2
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
I should also say that I watched a video and they disabled SELinux so I tried that too. However, it didn't work.

I've re-enabled SELinux because I didn't like the fact that it had me disable it. To re-enable it I just changed it setting back to "enforcing" from "disabled"
 
Old 03-16-2015, 11:38 AM   #3
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
I'm still working on this, so any help would be greatly appreciated. I've run the following command (with output):

Code:
> smbclient -U xmbc -L localhost
Enter xmbc's password: 
session setup failed: NT_STATUS_LOGON_FAILURE
 
Old 03-16-2015, 03:29 PM   #4
RiXtEr
LQ Newbie
 
Registered: Dec 2006
Posts: 2

Rep: Reputation: 0
Have you created the user for samba?

smbpasswd -a xbmc

If so confirm that the user is there by using pdbedit -lv also confirm that samba is running by using ps ax | grep smbd
 
Old 03-16-2015, 03:40 PM   #5
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
Yes, I have created the samba user (see #4 in the OP). However, your pdbedit command didn't work.
Yes, I have confirmed that samba is running both with systemctl and your ps command.

I have also tested with the following command and output:
Code:
> smbclient -U xmbc -L localhost
Enter xmbc's password: 
session setup failed: NT_STATUS_LOGON_FAILURE
 
Old 03-16-2015, 04:14 PM   #6
gor0
Member
 
Registered: Jun 2014
Distribution: quad BOOT!
Posts: 549

Rep: Reputation: 64
korora IS NOT Fedora !!!

fixed!
 
Old 03-16-2015, 05:01 PM   #7
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by gor0 View Post
korora IS NOT Fedora !!!

fixed!
And your comment was in no way related to my original post!

I said Koroa and put in brackets fedora so that if someone wasn't familiar with korora and was with fedora they could still probably help since IT IS BASED on Fedora.
 
Old 03-16-2015, 05:45 PM   #8
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
OK... I decided to start from scratch and I removed my shares that I had added. Then I removed the samba user. I then re-added the samba user and re-added the share. Now this is what I get:

Code:
# smbclient -U xbmc -L localhost
Enter xbmc's password: 
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.17]

	Sharename       Type      Comment
	---------       ----      -------
	movies          Disk      
	IPC$            IPC       IPC Service (Samba Server Version 4.1.17)
	xbmc            Disk      Home Directories
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.17]

	Server               Comment
	---------            -------
	MSI-DESKTOP          Samba Server Version 4.1.17
	XBMCBUNTU            xbmc-nT435-nT535 server (Samba, XBMC)

	Workgroup            Master
	---------            -------
	WORKGROUP            XBMCBUNTU
Within XBMC I dropped to the shell using CTRL+ALT+F2. I then logged in as xbmc and ran the following command:
$ smbclient -U xbmc -L 192.168.1.166

That gave pretty much the same output as above.

I then went back into Ubuntu within the XBMC box and I opened up a folder, browsed the network where I saw the computer, double clicked it and saw the only thing there was my share (movies). I clicked on that and was prompted for username and password. It had WORKGROUP entered for "Domain" which I don't know why that is. But, I entered in the username and password and it failed to mount the share.

I'm really puzzled but feel that I'm getting close and would appreciate any help that I can get please!
 
Old 03-16-2015, 09:09 PM   #9
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
I could really use some help here please. So far a couple hundred views and only a couple of responses??

I've now gotten it to connect via: $ smbclient -U xbmc //192.168.1.166/movies

When I enter that command it asks for a password and then goes the the smb:/> prompt. Then I enter ls or dir and I get NT_ACCESS_DENIED again.

Any suggestions. I'm reading more and it seems SELinux might be the problem but I don't think it is smart to disable it??
 
Old 03-16-2015, 09:54 PM   #10
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
After getting really close and still getting an ACCESS DENIED message, I finally decided to disable SELinux again and it is now working.

In my efforts to get it working, I set my permissions to /media (where I'm mounting my storage drive with the movies) at 777.

What are the correct settings and ownership settings for my setup?

Main user: jthornton
File/directory ownership: jthornton:jthornton

What do the permissions need to be to be able to have user xbmc access the files/directories?
 
Old 03-17-2015, 10:08 AM   #11
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 169

Rep: Reputation: Disabled
Code:
chown -cR xbmc:xbmc /media
Code:
chmod -cR 770 /media
If u dont want to disble selinux u can add file context to ur samba share
Code:
chcon -t samba_share_t -R 
/media

Last edited by zafar_dandoti; 03-17-2015 at 10:10 AM.
 
Old 03-17-2015, 10:25 AM   #12
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
I read up a lot on SELinux and while there were some saying not to just disable SELinux there were quite a lot of people saying that they understood how to get things working with SELinux but the reward is just not worth the hassle. So I decided to disable.

I changed ownership to jthornton:jthornton since this is my regular user. I then added xbmc to the jthornton group. I then chmod'd all files and directories to 770 jthornton:jthornton.

Is that okay?
 
  


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
LXer: Korora Takes Fedora 21 and Improves It LXer Syndicated Linux News 0 01-05-2015 06:41 AM
Add JRE to open with list under Fedora/Korora rutabega man Linux - Newbie 1 01-13-2014 07:46 PM
LXer: Meet Korora 20 – It's like Fedora, but Better LXer Syndicated Linux News 0 01-10-2014 10:41 AM
LXer: Fedora 19 vs Korora 19: which is the best distro for you? LXer Syndicated Linux News 0 12-08-2013 09:01 PM
Problem setting up Samba Print Server on Fedora Core 5 Randvegeta Linux - Server 1 06-14-2008 12:03 PM


All times are GMT -5. The time now is 04:16 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