LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 07-28-2015, 08:06 PM   #1
LWillmann
Member
 
Registered: Oct 2003
Location: Middle Tennessee
Distribution: CentOS
Posts: 37

Rep: Reputation: 15
Accessing Samba shares from a Domain Workstation


Our office is one location of approximately 8 in our enterprise. Our location is currently a "Workgroup" or "Peer to Peer" network at this time, however we are in the process of transitioning to the enterprise Microsoft AD domain.

We have some files that we're currently sharing on older machines to multiple users on our network. Those older machines need to be transitioned to something different. So my thought was to replace those aging computers with a single CentOS instance on our ESX box.

I have a CentOS 6.6 server running Samba 3.6.23-14.el6_6

I want to keep that CentOS/Samba server off of the domain.

I have configured Samba with a few 'public' shares, and a couple that are restricted to 'known' users.

I have been testing with the shares from both 'workgroup' and domain computers.

For a moment, assume I have not run the 'smbpasswd -a [username]' command and configured a Samba password for a linux user.

From my 'workgroup' computer, I can access the public shares without issue.
From my 'domain' computer, I can access the public shares without issue.

Attempting to access the 'known' user shares from either computer results in Windows asking for credentials. This is as expected, however because I haven't created a samba account for a user, none of the credentials are accepted from either computer.

Now, assume I run the 'smbpasswd -a [username]' command to create a Samba password for a linux user.

From my 'workgroup' computer, I can access the public shares, and when attempting to connect to the 'known user' shares, I am presented with a request for credentials. I enter the username and password and it works no problem.

From my 'domain' computer, I had the list of shares showing in an Explorer window. I clicked on one of the 'known user' shares to browse to the folder and it asked for credentials and it failed at every turn. I attempted to use "username", "\\server\username" and "\\server_ip\username" with the proper password. It fails across the board. I then tried to back up to the server's IP to see a list of all the shares and it also fails. So now I can't access any shares at all from the domain connected computer.

If I remove the Samba user that I configured earlier, I am again able to access the public shares using my domain connected computer.

So is there a way that I can configure Samba to NOT be part of a domain, but get my domain connected computers to access password protected shares?
 
Old 08-01-2015, 01:08 AM   #2
paul2015
Member
 
Registered: Apr 2015
Distribution: CentOS Fedora
Posts: 149

Rep: Reputation: 4
what does log files say? AD uses DNS to locate services on network and to authentocate user. so it is pointing to domain controller. does logs say that domain member machine tried to authenticate against samba server?

Last edited by paul2015; 08-01-2015 at 01:10 AM.
 
Old 08-01-2015, 09:36 AM   #3
LWillmann
Member
 
Registered: Oct 2003
Location: Middle Tennessee
Distribution: CentOS
Posts: 37

Original Poster
Rep: Reputation: 15
I managed to resolve this myself the other day and forgot to post. I apologize for that.

First, I was reading a how-to on Samba 4 and looking at the sample configuration that writer used.

I had been using
Code:
security = share
and the writer used
Code:
security = user
so I decided to try that.

This caused the server to request user credentials anytime a user attempts to view the shared resources on the box. It doesn't matter if Samba is configured for public access or individual user access. Changing the security mode to user forces Samba to require a valid user account in order to access anything on the box.

So then I added my user account to the samba user's list, assigning myself the same samba password as my domain password and it let me view the server's shared resources. On my non-domain workstation, it asked for user credentials so I gave it my username / password for Samba and it let me see stuff too.

So every user that needs to access the box will have to have an account on the box. But at least I can get them access, and I can set them to a nologin shell and they can still get to the shared files.

This makes things slightly more complicated for me in a few ways. First, I have to manually add the users to the linux box, and second have to manually add their passwords to Samba. Then, if a user ever changes their domain password, I will have to update their credentials on the linux box.

I'm still testing some of this, but at least I have managed to get access from both domain and non-domain computers.

Ideally, I'd like to be able to set it up so that I can assign a 'generic' user and allow multiple people use the same username / password to access the shared resources. But with the domain computers that doesn't seem to be possible to this point. But as I said, I'm still testing.

Last edited by LWillmann; 08-01-2015 at 09:38 AM.
 
  


Reply



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
domain users can't access samba shares on domain member server noahbeach Linux - Server 1 11-24-2010 05:16 AM
Samba 3.0.33 - problems accessing windows domain, and shares not visible vyruz18 Linux - Networking 1 04-08-2009 02:08 PM
Accessing samba workgroup shares from a different domain? FastForward Linux - Server 3 03-12-2009 03:47 PM
Accessing Windows shares in a domain humbletech99 Linux - Networking 6 03-29-2006 01:02 AM
Accessing Samba Shares The_Q DamnSmallLinux 2 02-05-2004 04:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:19 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
Open Source Consulting | Domain Registration