LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 04-25-2009, 08:12 AM   #16
newnewbie
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
New Problem


I have five users on the server. I want to run this as a stand alone server. I am not using this as a domain controller. All the users have samba passwd so I think they would be authenticated through the samba passwd file. I have commented out that unix password sync line out. I don't get that error message again when I run testparm, but now when I try to access the share by entering the user name and passwd I get that error message.


pics is not accessible. You might not have permissions to use this network resource. contact the network administrator of this server to find out if you have access permissions.

Multiple connections to a server or shared resource by the same user, using more that one user name are not allowed. Disconnect all previous connections to the server or share and try again.
 
Old 04-25-2009, 04:05 PM   #17
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 120Reputation: 120
Time to test without SELinux. Turn it off (setenforce 0). Test. Turn it back up (setenforce 1). Let us know how you go.
 
Old 04-26-2009, 04:49 PM   #18
newnewbie
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Thumbs down where do we g o from here

Same result. I get the dialog box to enter the username and passwd. Enter the user name and passwd and I get that same error message.
 
Old 04-27-2009, 04:03 AM   #19
chitambira
Member
 
Registered: Oct 2008
Location: Fife
Distribution: RHEL, Centos
Posts: 373
Blog Entries: 1

Rep: Reputation: 48
@jschiwal
Quote:
I don't agree with modifying the line to "Security = Share". That technology is for Windows 95 and obsolete.
Check Samba 3 Manual properly:
http://us3.samba.org/samba/docs/man/....html#SECURITY
Quote:
security (G)

This option affects how clients respond to Samba and is one of the most important settings in the smb.conf file.

The option sets the "security mode bit" in replies to protocol negotiations with smbd(8) to turn share level security on or off. Clients decide based on this bit whether (and how) to transfer user and password information to the server.

The default is security = user, as this is the most common setting needed when talking to Windows 98 and Windows NT.

The alternatives are security = share, security = server or security = domain .

In versions of Samba prior to 2.0.0, the default was security = share mainly because that was the only option at one stage.

There is a bug in WfWg that has relevance to this setting. When in user or server level security a WfWg client will totally ignore the username and password you type in the "connect drive" dialog box. This makes it very difficult (if not impossible) to connect to a Samba service as anyone except the user that you are logged into WfWg as.

If your PCs use usernames that are the same as their usernames on the UNIX machine then you will want to use security = user. If you mostly use usernames that don't exist on the UNIX box then use security = share.

You should also use security = share if you want to mainly setup shares without a password (guest shares). This is commonly used for a shared printer server. It is more difficult to setup guest shares with security = user, see the map to guestparameter for details.

Last edited by chitambira; 04-27-2009 at 04:05 AM.
 
Old 04-27-2009, 04:33 AM   #20
chitambira
Member
 
Registered: Oct 2008
Location: Fife
Distribution: RHEL, Centos
Posts: 373
Blog Entries: 1

Rep: Reputation: 48
please repost your complete smb.conf
also /etc/pam.d/system-auth

I suggest you follow correctly my first post and add to your smb.conf
Quote:
passwd program = /bin/passwd %u

Last edited by chitambira; 04-27-2009 at 04:43 AM.
 
Old 04-27-2009, 04:25 PM   #21
newnewbie
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
I am on to something!

I did reconfigured my smb.conf file. When I rum the command setenforce 0
I can see all the files and folders. When I revert to setenforce 1 I can't see anything here is my smb.conf file.


#
workgroup = cleus
server string = Samba Server
security = user
host allow = 192.168.15.1/24 127.0.0.1

[homes]
; comment = Home Directories
; browseable = yes
; writeable = yes
; valid users = %S
; valid users = MYDOMAIN\%S

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
; guest ok = no
; writeable = no
printable = yes
# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
; [Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes


# A publicly accessible directory, but read only, except for people in
# the "staff" group
; [public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff

[pics]
comment = all our photos
path = /pics
read only = yes
 
Old 04-27-2009, 04:48 PM   #22
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 120Reputation: 120
When you say you can't see anything with SELinux on, do you mean just in pics?

Can you show "ls -lZ /pics"
 
Old 04-27-2009, 07:51 PM   #23
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.2, Centos 5.8
Posts: 11,696

Rep: Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900
You can check the SELinux booleans:
Code:
getsebool -a|egrep -e sam -e smb
and file contexts
Code:
semanage fcontext -l|egrep -e sam -e smb
 
Old 04-27-2009, 09:11 PM   #24
newnewbie
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Hey Billy when I turn selinux I cannot see anything whatsoever. I can see the folders but cannot get into them. When I turn it off again I can see the mbox file in the home directories and all the files in the /pics share. Here is the output of the command you ask to run ls -lZ /pics

[root@fileserver ~]# ls -lZ /pics
-rwxr-xr-x root root rootbject_r:user_home_t 1001704456_l.jpg
-rwxr-xr-x root root rootbject_r:user_home_t aimon's toast2.jpg
-rwxr-xr-x root root rootbject_r:user_home_t cake1.jpg
-rwxr-xr-x root root rootbject_r:user_home_t cake 2.jpg
 
Old 04-27-2009, 09:22 PM   #25
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 120Reputation: 120
Can you also show "ls -lZd /pics"?

First I'd change the ownerships to something other than root (chown user:user_group /pics/* - substitute suitable user and user_group names).

Then "chcon user_ubject_r:user_home_t /pics/*"

See how you go. You may also need to "chcon -t samba_share_t /pics"

BM
 
Old 04-30-2009, 08:15 AM   #26
newnewbie
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Hey Billy,

I have been working on it and I figured out it was a problem with the ownership of the files. I did what you said, the command chcon whatever way I try to run it I get an error message. I am not too familiar with it. I check out the info pages but could make much out of it so I tried running it like this chcon user_object_r:user_home_t /pics/*" then got and error saying chcon: invalid context: user_object_r:user_home_t. Tried it again. Tried another this way and got chcon -u cleus /pics
chcon: failed to change context of /pics to cleusbject_r:samba_share_t: Invalid argument

I have created a group placed all the user into the group and changed the ownership of the files. This is what it all looks like.

-rwxrwxr-x cleus family rootbject_r:user_home_t sarah.jpg
-rwxrwxr-x cleus family rootbject_r:user_home_t Sarah.jpg
-rwxrwxr-x cleus family rootbject_r:user_home_t Simon & Shanti 2.jpg
-rwxrwxr-x cleus family rootbject_r:user_home_t Simon&Shanti3.jpg
-rwxrwxr-x cleus family rootbject_r:user_home_t Simon & Shanti.jpg



Thanks for all the help so far
 
Old 05-02-2009, 08:33 PM   #27
newnewbie
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Seems like everyone forgot about this post here. I am still not able to get this thing to run as it should. I still have to setenforce to 0. Can someone help.



Hey Billy,

I have been working on it and I figured out it was a problem with the ownership of the files. I did what you said, the command chcon whatever way I try to run it I get an error message. I am not too familiar with it. I check out the info pages but could make much out of it so I tried running it like this chcon user_object_r:user_home_t /pics/*" then got and error saying chcon: invalid context: user_object_r:user_home_t. Tried it again. Tried another this way and got chcon -u cleus /pics
chcon: failed to change context of /pics to cleusbject_r:samba_share_t: Invalid argument

I have created a group placed all the user into the group and changed the ownership of the files. This is what it all looks like.

-rwxrwxr-x cleus family rootbject_r:user_home_t sarah.jpg
-rwxrwxr-x cleus family rootbject_r:user_home_t Sarah.jpg
-rwxrwxr-x cleus family rootbject_r:user_home_t Simon & Shanti 2.jpg
-rwxrwxr-x cleus family rootbject_r:user_home_t Simon&Shanti3.jpg
-rwxrwxr-x cleus family rootbject_r:user_home_t Simon & Shanti.jpg



Thanks for all the help so far
 
  


Reply

Tags
samba


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Share Access with Samba? your_shadow03 Linux - Newbie 1 03-25-2009 09:51 AM
samba share cannot access muhammednavas Linux - Software 2 06-14-2007 04:49 AM
Access denied when attempting access samba share warlockvix Linux - Software 1 05-11-2007 02:36 PM
Samba Share access Spadge67 Fedora 3 11-19-2005 06:57 PM
Samba: can't access share thorax Linux - Software 4 02-13-2005 12:39 PM


All times are GMT -5. The time now is 02:30 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration