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 01-14-2009, 04:21 AM   #16
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122

You'll have messages (somewhat cryptic) in /var/log/audit/audit.log.

Can I suggest you set up a test share, say /share, and get that working before you try a thumb drive? That will enable you to isolate issues around the drive itself as opposed to samba.

Once you create the share (with mkdir /share), (see instructions insmb.conf), do

chcon -t samba_share_t /share

to give the correct SELinux context (ie allow samba to access the share).

Add /share as a share to smb.conf and see how you go
 
Old 01-14-2009, 04:28 AM   #17
davidb2002
LQ Newbie
 
Registered: Oct 2007
Location: UK
Distribution: Centos 5
Posts: 18

Original Poster
Rep: Reputation: 0
Right, created a new share:

[global]
workgroup = WORKGROUP
netbios name = MPLINUX2
security = share
passdb backend = tdbsam
cups options = raw

[thumb]
guest ok = yes
force user = root
comment = Thumb Drive
writable = no
path = /media/thumb/
[testshare]
comment = test share
path = /share

currently getting prompted for password on mplinux/Guest. permissions are 755, group: root, owner: root
 
Old 01-14-2009, 04:39 AM   #18
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Comment out

passdb backend = tdbsam

and see how you go
 
Old 01-14-2009, 04:48 AM   #19
davidb2002
LQ Newbie
 
Registered: Oct 2007
Location: UK
Distribution: Centos 5
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks for holding my hand (i really need it as im a complete numpty)

commended it out, both shares are still prompting for password for user MPLINUX2/Guest
 
Old 01-14-2009, 04:58 AM   #20
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Have you created any samba users? If not you should create one for your forced user (it shouldn't be root, you should create another, or use your username perhaps). If you insist on root, you'd use "smbpasswd -a root".

Try again and see how you go (Do read that link I gave you - there is an example of exactly what you are trying to do given as example 2.2)
 
Old 01-14-2009, 05:14 AM   #21
davidb2002
LQ Newbie
 
Registered: Oct 2007
Location: UK
Distribution: Centos 5
Posts: 18

Original Poster
Rep: Reputation: 0
Okay, so ill take your advice and use a different user called 'windows'.

When I put in 'smbpasswd -a windows', it prompts me to enter a password twice then returns 'Failed to modify passwod entry for user windows'.

Shall I match the conf setup as stated in 2.2 on those docs. What group should I select?
 
Old 01-14-2009, 05:21 AM   #22
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Are you running the command as root, as an ordinary user probably can't add a new samba user.

The users group is good if you have it. Try "grep users /etc/group" to check

I'm signing off for the evening
 
Old 01-14-2009, 06:16 AM   #23
davidb2002
LQ Newbie
 
Registered: Oct 2007
Location: UK
Distribution: Centos 5
Posts: 18

Original Poster
Rep: Reputation: 0
Cheers for the help mate.

I watched the video mentioned (http://www.linuxplanet.com/linuxplan...orials/6552/1/) and thought I would have a go. I have added root to smbpasswd (smbpasswd -a root). I am now able to read/write 'stuff' and 'newshare' shares from the below conf. I cannot access 'root' and 'thumb'. I get an access denied, do not have permission, error in windows when trying to. So something must be blocking access to those folders.

Code:
[global]
	workgroup = WORKGROUP
	netbios name = MPLINUX2
	security = user
        #invalid users = root
	#passdb backend = tdbsam
	cups options = raw

[thumb]
   browseable = yes
   writable = yes
   force user = root
   force group = root
   path = /media/thumb
guest ok = yes
[homes]
   comment = Home Directories
   browseable = no
   writable = yes

[stuff]
   directory = /share
browseable = yes
   writable = yes
   force user = root
   force group = root
guest ok = yes

[newshare]
   directory = /newshare
browseable = yes
   writable = yes
   force user = root
   force group = root
guest ok = yes
 
Old 01-14-2009, 09:52 AM   #24
davidb2002
LQ Newbie
 
Registered: Oct 2007
Location: UK
Distribution: Centos 5
Posts: 18

Original Poster
Rep: Reputation: 0
found my problem was SELinux. Because its only a local pc, I have disabled it completly. (Google 'disable selinux' for answers)

Also helps to turn off iptables in some cases.


Wheres all that in the samba docs?
 
Old 01-14-2009, 10:52 AM   #25
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
http://www.samba.org/samba/docs/man/...TO-Collection/

Or google for "samba example simple share".
 
Old 01-14-2009, 01:19 PM   #26
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
The CentOS smb.conf has SELinux notes in it (which I find pretty good, but the I have a [very] basic understanding of SELinux).

SELinux is only on few distros, and is not a samba thing at all (here's some reading if you are interested http://docs.fedoraproject.org/selinu...ide/f10/en-US/). I would assume the firewall stuff is mentioned in the samba docs, but haven't looked for it lately.

Glad things worked.

BM
 
  


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
Vi alternatives Gins Linux - General 9 09-05-2005 10:29 AM
Alternatives to x? ampex189 Linux - Software 9 03-22-2005 01:21 PM
Fsck How To? / alternatives ? m-blaster Linux - Software 2 12-19-2004 11:46 AM
alternatives for sendmail jogurt666 Linux - Software 1 11-04-2004 09:45 AM
Alternatives matahchuah Linux - Software 1 02-17-2004 05:08 PM


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