Question

CentOS File Server and Windows Active Directory

Asked by: BNLIND

I have joined my CentOS 5.3 server to my Windows 2003 Active Directory Domain, but now I'm having an issue setting up shares. Below, I have some example code which I have in my smb.conf file to set up a share called "Share". However, connecting to that share from an XP machine on the domain, I get the error "The network name cannot be found".

I'm trying to set the Active Directory group "Domain Users" to have full access to the share, but Samba is not cooperating with me. I have already set the file system permissions to 777 on the Shared folder.

Please help! Thanks.

this is an excerpt from smb.conf file:
 
[Shared]
     comment = Shared Drive
     path = /media/storage1/Shared
     read list = @everyone, @domain users
     write list = @everyone, @domain users
     read only = No

                                  
1:
2:
3:
4:
5:
6:
7:
8:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-08-14 at 12:48:14ID24654094
Tags

centos

,

active directory

,

samba

,

file sharing

Topics

Samba File Server

,

CentOS

,

Samba File Sharing

Participating Experts
3
Points
500
Comments
20

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Linux - CentOS 5.2 questions
    I'm new to Linux and have a few questions. 1) Which download of MySQL is recommended for CentOS 5.2? http://dev.mysql.com/downloads/mysql/5.0.html#downloads 2) After installing, the host name of the server was that of an old PC that use to be part of our system. I didn'...
  2. How to migrate CentOS, Samba to Active Directory and Ex…
    Greetings, Here we go : Does this sort of migration sounds familiar: CentOS 3 with mail to W2K3 AD and Exchange 2007 I am merely looking at a way/various ways to export Samba to AD via tools/scripts and email adresses in Exchange 2007.
  3. RHEL/Centos Directory Server
    Hello Experts, i am trying to get in touch with the centos directory server (aka rhel directory server or fedora directory server). As i understand this server is able to manage a large number of users and to store many information about everyone and everything. But i have ...
  4. Samba Setup on CentOS 5.4 help.
    Say, I can browse the windows workgroup. How do I give my CentOS PC a name and how can I then set it up to allow browsing from the windows machine?

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: fosiul01Posted on 2009-08-14 at 12:53:35ID: 25101746

Have you checked with SElinux permission ???

if your selinux is enabled then you will have to give selinux permission on that directory for share


chcon -R -t samba_share_t <Directory Name>

 

by: BNLINDPosted on 2009-08-14 at 12:59:47ID: 25101787

I think I'm just going to disable SElinux and reboot.....Most of the problems I keep running into with this server are related to SElinux.

But did I do the grouping correctly? I read that you needed to put an '@' in front of a group name, but it didn't say anything about what to do with group names that contain spaces (e.g. Domain Users).

 

by: it4sohoPosted on 2009-08-14 at 13:00:28ID: 25101791

First, I'm assuming you're browsing to \\server\Shared (not \\server\Share) -- the D at the end is in your config, so it has to be there in your client

Second, your read list and write list arguments should be removed...

[Shared]
        comment = PUBLIC FILES
        path = /media/storage1/Shared
        guest ok = No
        writeable = Yes
        force create mode = 0766
        force directory mode = 2777


The two "force" commands make sure that all files that are in Shared are created as sharable (global permissions).

I hope this solves the issue!

Dan
IT4SOHO

 

by: BNLINDPosted on 2009-08-14 at 13:11:17ID: 25101883

It solves that issue, but whenever directories are copied from the existing Windows server, none of the permissions get copied to the CentOS server....everything is set to Full Control for Everyone

 

by: KeremEPosted on 2009-08-14 at 13:13:00ID: 25101896

First of all make sure that your /etc/resolv.conf points to your AD name server or make sure that you have an /etc/hosts entry so that you can ping the AD server.

You told you'd joined to the AD did you add GID aund UID mappings etc that will help you fully integrate with the AD ??


 

by: BNLINDPosted on 2009-08-14 at 13:17:04ID: 25101931

KeremE:
It's already on the AD domain, and authentication works with it and all that stuff

 

by: fosiul01Posted on 2009-08-14 at 13:21:29ID: 25101965

We dont use Samba too much in our organization thats why never went deep in Samba!!

how ever you can define share in samba for domain like this

[share]        
      comment = a comment        
      path = /home/share        
      browseable = yes        
      read only = no        
      inherit acls = yes        
      inherit permissions = yes        
      create mask = 700        
      directory mask = 700        
      valid users = @"DOMAIN+Domain Users"   <-- define your ADS groups        
      admin users = @"DOMAIN+Domain Admins"  <-- define your ads groups with admin rights  

 

by: BNLINDPosted on 2009-08-14 at 13:30:20ID: 25102045

fosiul01:

This question and my other question are now turning into the same question, so I'm going to close out this question, as disable SElinux solved this question.

Here is a link to my other question:
http://www.experts-exchange.com/OS/Linux/Distributions/CentOS/Q_24651793.html#a25101979

Basically, setting permissions at the share level won't work for us because we have several folders in a share that have different file permissions. So I'm trying to find a way to move that file server to CentOS with all the folders + file permissions intact.

 

by: BNLINDPosted on 2009-08-14 at 13:38:07ID: 31615961

I ended up disabling SElinux altogether because it was causing other problems as well. But I wouldn't have thought about SElinux if you hadn't said anything, so this question is answered as far as I'm concerned.

 

by: fosiul01Posted on 2009-08-14 at 13:38:36ID: 25102124

yes i saw that question but was keep quite because my lack of Samba knowledge!!!
anyway

Ok so you saying

you want to copy all the folder from windows directory to Centos Serer but you want to keep the original permission you had from windows , is that right??

 

by: BNLINDPosted on 2009-08-14 at 13:41:52ID: 25102154

Correct.....but as I just mentioned in my other question, I tried to modify the permissions on a folder from an XP client and no matter what I do, the permissions get reset to Domain Users (Full), Everyone (Full), and my username (Full).

So copying and manually setting permissions fails.

 

by: it4sohoPosted on 2009-08-14 at 15:57:09ID: 25103075

If you used my example and used "force create mode" then you cannot change the permissions (they are forced to the mode you entered)... take away the "force" and you should regain the ability to change permissions.

(The cut/paste example I showed is a folder we call public -- we don't want anything in there but PUBLIC files, so we force the permissions -- your case is obviously different)

I hope this helps!

Dan
IT4SOHO

Also, as I have mentioned before (other threads) regarding retaining permissions, you cannot just COPY files (not even onto a Windows Server) and have them retain the original permissions. When you copy, you create a NEW file that has a NEW set of permissions -- set to the default values to start with.

Also, as has been brought up earlier, if you're going to use multiple Windows (AD or PDC) groups, you'll need to enable ACLs -- on the filesystem AND on Samba.

 

by: KeremEPosted on 2009-08-14 at 16:34:38ID: 25103228

> Correct.....but as I just mentioned in my other question, I tried to modify the permissions on a folder from
> an XP client and no matter what I do, the permissions get reset to Domain Users (Full), Everyone (Full),
> and my username (Full).
>
> So copying and manually setting permissions fails.

This is because you think that joining a domain in SAMBA is enough for active directory integration. I've previously told you you need other settings besides SAMBA but you told "you've already joined the directory.

Actually AD integration takes you join to the directory and also login to the Kerberos Realm and then you will map UID's and GID's from AD to SAMBA.

but actually it deserves another question. This is way off limits of this question which is already and closed without much consideration :) Pity.

 

by: BNLINDPosted on 2009-08-14 at 16:38:26ID: 25103242

KeremE:

I already have it set up with Kereros and UID and GID's....that was solved in another thread long before this thread existed.

 

by: BNLINDPosted on 2009-08-14 at 16:39:38ID: 25103247

it4soho:

Actually, you DID say that I could just copy the files and have their permissions intact in my other thread:

"If CentOS and Samba were setup correctly, then you should be able to copy the files from the old Windows Server to the CentOS/Samba server (using CIFS) and preserve the permissions automatically."

 

by: BNLINDPosted on 2009-08-14 at 16:40:52ID: 25103250

it4soho:

You did, however mention that the owner would be changed to the person doing the copying.

 

by: BNLINDPosted on 2009-08-14 at 16:42:55ID: 25103258

it4soho:

You also mentioned that using NTBackup would preserve the owner. Would it also preserve the ACL's? If it does, then I can just run NTBackup on the Windows server, backup the drive and do a restore to the CentOS file server.

 

by: KeremEPosted on 2009-08-14 at 16:57:44ID: 25103296

Seems to me that there's something still missing which will do the trick for you and it is here at the AD integration part. Anyway good luck.

 

by: it4sohoPosted on 2009-08-18 at 10:57:24ID: 25125796

Yes, the NTBackup utility stores ALL of the permissions on the files & folders, and assuming you have the ACLs permitted on your samba filesystem (and in Samba), when they are restored (presumably over a samba share), ALL of the permissions will be restored.

NOTE: "Copy"ing files (in Windows & Linux) makes a NEW file that is owned by the current user and has permissions of any OTHER file owned or created by that user.

"Move"ing files will preserve the previous ownership & permissions, but is DANGEROUS on Windows systems because the source file can be deleted even if the target file isn't created properly.

Thus, your best bet is to use the backup/restore option.

I hope this clears things up... I guess I need to be more careful in using the term "copy"...

Good Luck!

Dan
IT4SOHO

 

by: BNLINDPosted on 2009-08-18 at 12:43:07ID: 25126794

Thank you it4soho. That does clear it up for me....and kind of make sense now that you explain it. That being the case, I think I'll give NTBackup a shot. And speaking of backups, that will be my next thread....Linux-based Network Backup Solution (with support for Windows file and database servers). We will be replacing our Windows backup server (which is running Symantec/Veritas Backup Exec) next.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...