Question

Linux Fedora7 Samba Joining ADS on Windows Server 2003

Asked by: daveviolante

Hi all,

I have installed Linux Fedora7 that it's basically the same as Red Hat Linux v5.

Issue:

I need to Join the Fedora 7 to ADS I followed different instructions guide line during the past weeks, I even ask help here in Expert Exchange and that question was closed but the problem never realy solved

I can join successufully no errors at all when I do the wbinfo  from the root account -t or -u or -g I can see al users account from AD all groups and RPC calls succesed with the -t switch. The wbinfo command is also succesful from normal local Linux account.

Here the fun:

I cannot logon at all with any of the Domain accounts no matter if is Domain Admin account or normal user account.

The computer account is also succesfully created on the DC and the Host A records is created on the DNS server.

When I join with  # net ads join -U violanted (password is prompted)
The result  is:
Joined account fedora7 in Real technopc.eu
I can even leave the Domain without any errors:

[root@fedora7 ~]# net ads leave -U violanted
violanted's password:
Deleted account for 'FEDORA7' in realm 'TECHNOPC.EU'
[root@fedora7 ~]#
Than the account will disappers how it should from the DC

So...no errors configuration seem to be absolutely OK from any side why I cannot login using the the domain accounts once joined ADS?

The most accured guide line that I followed and that gave me the best result can be found at the following link:

http://www.interopsystems.com/LearningCenter/Using_Samba_and_Kerberos.htm

I can also see the account on the login mask from the GUI into the phisiacal Fedora server but the issue is the same cannot login with the domain users accounts.

Who will solve this issue with some help will get the 500 points immediately no delay

Thanks

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-07-14 at 08:25:11ID24569115
Topics

Fedora Linux

,

Samba File Server

,

Active Directory

,

Linux

,

Windows 2003 Server

Participating Experts
2
Points
500
Comments
19

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. Samba
    I have samba running and every thing works until I try to join the domain I get an error. XP pro and redhat 8
  2. SAMBA
    I have read some reviews of SAMBA which are pretty lauditory. Does anyone know of a LAN which actually uses this application? If so, do you know anything about the reliability and security of the program?
  3. Samba setup with winbind: Error looking up domain users
    Hello, I am trying to setup the samba for one linux box. I am not a regular linux user so please bare with me. Currently, I have a windows domain setup where all the windows box use domain to access all the computers and access remote folders. (Windows xp for pcs and 2003 ...
  4. Trying to join linux webserver with samba to active director…
    Overall I'm trying to figure-out how to allow active directory users access file shares on a linux box (that has samba installed). Our AD is called ad.xxx.edu. I use this command to try to join the box (followed by the error I rec'): net join -w ad.xxx.edu -S 128.255.255.49 ...

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: RedimidoPosted on 2009-07-16 at 12:49:19ID: 24873076

Hi

Can you post here your smb.conf ?

Remember some tips:
- stop selinux
- your security has to be ADS
- increase the log level to 6 and check the error messages to locate the root cause.

Just follow this excellent link:
http://www.experts-exchange.com/Software/Server_Software/File_Servers/Samba/Q_23372014.html

If you do not want to dig into that question here is how your global section must look like:

[global]
        workgroup = DOMAIN
        password server = pdc.domain.local
        realm = DOMAIN.LOCAL
        security = ADS
        #winbind section
        idmap backend = rid:DOMAIN=10000-20000
        idmap uid = 10000-20000
        idmap gid = 10000-20000
        allow trusted domains = no
        winbind refresh tickets = yes
        winbind use default domain = yes
        winbind offline logon = false
        winbind enum users = yes
        winbind enum groups = yes
        template homedir = /home/%D/%U
        template shell = /bin/bash
        guest account = nobody
        map to guest = bad user

 

by: daveviolantePosted on 2009-07-16 at 13:20:04ID: 24873444


I will try tomorrow
I will send the smb.conf

 

by: daveviolantePosted on 2009-07-17 at 05:51:37ID: 24878093

I adopted the exact configuration mentioned from you but unfortunately result has not changed.

I can join the Domain Successfully and I can test users:
[root@fedora7 samba]# net ads join -U violanted
violanted's password:
Using short domain name -- TECHNOPC
Joined 'FEDORA7' to realm 'TECHNOPC.EU'
[root@fedora7 samba]# wbinfo -t
checking the trust secret via RPC calls succeeded
[root@fedora7 samba]# wbinfo -u
guest
violanted
krbtgt
support_388945a0
simonev
antonior
agnesm
nadirm
valentinav
edc72976-d2cf-4e8c-9
iusr_dc-02
iwam_dc-02
bkup-alert
andreac
rdhl
iusr_dc-01
iwam_dc-01
ipmonitor
aspnet
san
ugov
iusr_dc-03
iwam_dc-03
[root@fedora7 samba]#

I try to access the from command line or from physical Fedora Server I get:
login as: agnesm
agnesm@82.169.132.216's password:
Access denied
agnesm@82.169.132.216's password

[global]
#--authconfig--start-line--

# Generated by authconfig on 2009/07/14 10:57:18
# DO NOT EDIT THIS SECTION (delimited by --start-line--/--end-line--)
# Any modification may be deleted or altered by authconfig in future

   Here the smb.cong

Pam has been also configured I added a line for the home directory


        workgroup = TECHNOPC
        password server = dc-02.TECHNOPC.EU
        realm = TECHNOPC.EU
        security = ADS
        #winbind section
        idmap backend = rid:DOMAIN=10000-20000
        idmap uid = 10000-20000
        idmap gid = 10000-20000
        allow trusted domains = no
        winbind refresh tickets = yes
        winbind use default domain = yes
        winbind offline logon = false
        winbind enum users = yes
        winbind enum groups = yes
        template homedir = /home/%D/%U
        template shell = /bin/bash
        guest account = nobody
        map to guest = bad user

What's wrong?


 

by: RedimidoPosted on 2009-07-17 at 10:16:46ID: 24880675

I believe you will not be able to log on to the Linux box with the AD accounts.

Have you tried to access from a windows workstation to a share, say the home directory of the user?

It looks to me you want to use AD to authenticate against Linux to ssh inside, but the configuration stated here is for samba only.

 

by: it4sohoPosted on 2009-07-17 at 10:39:37ID: 24880879

If the desire is to be able to log into the Linux System with the AD account, they you're going to have to modify PAM -- by default, all of the AD setup HOWTOs are designed to allow AD access via SAMBA, so the Samba winbind utility is what checks the AD authentication.

But the standard login (and xlogin) programs do not know how to use winbind to authenticate...

I don't have time to do the research, but I have to think that there are PAM modules out there that can do this!

Good Luck!

Dan
IT4SOHO

 

by: RedimidoPosted on 2009-07-17 at 13:47:58ID: 24882732

Oh it is perfectly possible to log on to linux using LDAP, and thus also Active Directory

But the question is: it is what you want? is it Samba or is it Login authentication.

 

by: daveviolantePosted on 2009-07-17 at 14:27:11ID: 24883173



Login authentication from ssh and also from linux it self this is what I need to do.

 

by: RedimidoPosted on 2009-07-17 at 14:45:33ID: 24883296

Very well then.

You may then want to follow this for centos:
http://blog.wazollc.com/Lists/Posts/Post.aspx?ID=2

 

by: daveviolantePosted on 2009-07-18 at 01:43:16ID: 24885273


Hi,

I followed that link and I followed step by step all the instructions.

I am not sure about the ldap.conf file I made the changes but not sure if they are fully correct.

In any case using the AD account I am still not able to login from ssh or from the linux it self.

I have some users that needs to work on fedore only fromm ssh so my scope is to let them logon using the AD account.

So far this it has been a mission impossible.
I am not able to find on the internet the proper info and correct steps on how to accomplish this.

 

by: it4sohoPosted on 2009-07-19 at 11:54:03ID: 24890591

I have found an article you might find will help you at
  http://www.occam.com/tools/ad_auth.html

You can find more by simply googleing for "PAM Active Directory login"

NOTE: The article noted above has 3 parts:
 1) linking AD into Samba (and running winbindd) -- which it appears you already have done
 2) linking AD into PAM (for login and ssh) -- be careful not to redo the parts you've already done (like krb5.conf)
 3) mapping AD users & groups to EXISTING *nix users & groups -- which you may or may not want

Good luck!

Dan
IT4SOHO

 

by: daveviolantePosted on 2009-07-28 at 00:39:20ID: 24958562

I tried to follow up all suggestions provided but I can tell that in general there is not a proper internnet guide line that drives you towards the right configuration of AD Authentication in Linux and Samba Authentication. I can succesful join Samba to the Domain in Fedora 7 and can see all users if I run:
# wbinfo -u
# wibinfo -t
# wbinfo -g
but if I run:

[root@fedora7 ~]# wbinfo -a violanted%M@ndelbaum01
plaintext password authentication failed
error code was NT_STATUS_NO_SUCH_USER (0xc0000064)
error messsage was: No such user
Could not authenticate user violanted%M@ndelbaum01 with plaintext password
challenge/response password authentication succeeded
So i am not sure what that means but I cannot logon to linux using an AD account, not matter if I try from putty ssh or from linux it self.

Any other idea?

 

by: it4sohoPosted on 2009-07-28 at 16:14:16ID: 24966074

Let's see if I can make this more clear...

Samba is the ONLY part of your system that has "joined" the AD. Samba is the only part of your Linux system that knows (or cares to know) about Microsoft, and that is because Samba was specifically designed to do so.

The Linux login program knows no more about AD login names than it does e-mail addresses or websites that you are managing.... unless you somehow TELL it to query using some other authority -- and the WAY that you tell it to use some other mechanism is through PAM (Pluggable Authentication Modules).

The same thing goes for SSH. By default, SSH will only authenticate to "local" user accounts. To tell it to do otherwise is NOT a configuration change in SSH, but rather one in PAM.

If you look in the folder /etc/pam.d, you'll find files for virtually any program that might want to authenticate users on your Linux system. Exceptions would include programs that are specifically designed to have an independent user database -- like HTTP & MySQL. But login is there, as is sshd.

A sample entry for login might be:
auth       required     pam_securetty.so
auth       include      system-auth
account    required     pam_nologin.so
account    include      system-auth
password   include      system-auth
session    include      system-auth
session    required     pam_loginuid.so
session    optional     pam_console.so

Among other things, this says that the ROOT user can only login on a secure TTY. Users can be validated by the system authentication (/etc/passwd), and many other options -- I'm not going to write a whole PAM tutorial here.

Now, the page I sent you to has instructions on how to move a library named pam_winbind.so.1. from the Samba build into the /usr/lib/security folder. The BEST news is that it is probably ALREADY in your libraries... somewhere! (Mine got loaded into /lib64/security, but that's because I'm on Fedora Core 5 x86_64).

So, what you'll want to do is to see if you already have that library lurking around somewhere... try:
  find / -name "pam_winbind.so*"

Again, in my case, it turns out to be /lib64/security/pam_winbind.so"

Now, there is ONE thing that is "off" in the instructions... namely, they are using PAM1.0 nomenclature, and if you're using a 2.6 kernel, you're much more likely to be using PAM2.0. (The difference is that PAM1.0 used one monolithic config file, and PAM2.0 uses individual files for each program that uses it.)

So, where the instructions say to make an entry like:
   other         account sufficient         pam_winbind.so

What you will want to do is to add the line below to both the login and sshd files in /etc/pam.d:
   account     sufficient      pam_winbind.so
ALSO, you'll want to add it at the beginning of the account "section" -- so if you were using MY login file from PAM above, it would look like:

auth       required     pam_securetty.so
auth       include      system-auth
account    sufficient    pam_winbind.so
account    required     pam_nologin.so
account    include      system-auth
password   include      system-auth
session    include      system-auth
session    required     pam_loginuid.so
session    optional     pam_console.so

Now, once that is done (and I'm skipping the step where you check the AD join's validity -- you say that's already working), use the "id" command, like so:
  id violanted

If that returns the requested info, then logoff and try to login again.

One final note: an option in SSH is required to use some PAM features, so make sure that your /etc/ssh/sshd_config file includes the line that says:
UsePAM    yes

I hope this helps clear things up a bit... I've just tried these settings in a client environment, and was successful at getting SSH logins for AD users. (I don't typically let users login to my Linux systems because they're servers!)

Good Luck!

Dan
IT4SOHO

 

by: daveviolantePosted on 2009-07-30 at 04:19:36ID: 24978501

Hi
I honestly tried the exact configuration proposed from you and we followed once again the guide previously sent we add the lines into pam to be able to login from ssh. We made sure that sshd was configured with UsePam yes but still doesn't work.

As I said I can joined the Domain I can see all Users Groups so Samba is definitely Joined to the Domain but once we try to login from putty ssh using a domain account we get access denied, same if we try from the GUI on the physical Fedora Server. Now to enable Authentication with AD we need to enable ldap?

I mean everythime I configure ldap as well than the system Fedora 7 hangs. I also notice that the GUI interface is gone and cannot login anymore from there as we get black window.

From the ssh when we enable ldap we can login only with the locall account or as root.

Here it's all strange I do not understand the logic behind.

I am more a windows guy but it's about two years I am using Linux and I can do quiet a lot's of things with linux but accomplish the current task seems to be mission impossible

 

by: daveviolantePosted on 2009-07-31 at 06:45:43ID: 24988698

Hello,

We completely mess up all configurations regarding this AD Authenticaion in Fedora7 using ssh.
All I want is to have the users in AD to login into the Fedora box using they Domain account, and possibly when they login have an home directory created to the local server. That's all!

What's the mandatory configuration to make this happen?

I need full documentation if possible please I am still new in Linux but I need to do so and also I like to learn.

thanks

 

by: daveviolantePosted on 2009-07-31 at 06:49:07ID: 24988732

We installed a fresh copy of Fedora 7

All I want is to have the users in AD to login into the Fedora box using they Domain account, and possibly when they login have an home directory created to the local server.

What's the mandatory configuration to make this happen?
I am confuse between ldap, pam, and winbind

Which one of those we need to configure?

All of them or.....

Thanks

 

by: it4sohoPosted on 2009-07-31 at 15:00:35ID: 24992794

I have found an article you might find will help you at
  http://www.occam.com/tools/ad_auth.html

It takes you STEP BY STEP through configuring so your Linux can share files on the AD (you have to have samba to do ANYTHING with AD), and then how to let AD users login to Linux...

Dan
IT4SOHO

 

by: daveviolantePosted on 2009-08-10 at 05:46:09ID: 31603317

We finally made it I followed all your excellent links it has been hard for me as new Sys Admin in Unix but I learn a lot from you.

Also thanks to be patient and to keep helping me on get our issue solved

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...