[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Cannot join Fedora box to domain

Posted on 2009-04-27
2
Medium Priority
?
1,263 Views
Last Modified: 2013-12-06
Hi all.

I am attempting to run the following join command as su, then i get the below error.

[root@epicfedora01 samba]# net rpc join -S epic16 -U xhutchinson
Enter xhutchinson's password:
[2009/04/28 16:30:36,  0] rpc_client/cli_pipe.c:get_schannel_session_key_common(2449)
  get_schannel_session_key: could not fetch trust account password for domain 'EPICENTRE'
[2009/04/28 16:30:36,  0] utils/net_rpc_join.c:net_rpc_join_ok(87)
  net_rpc_join_ok: failed to get schannel session key from server epic16 for domain EPICENTRE. Error was NT_STATUS_CANT_ACCESS_DOMAIN_INFO
Unable to join domain EPICENTRE.
[root@epicfedora01 samba]#


thanks,

Xavier.
0
Comment
Question by:locdang
2 Comments
 
LVL 21

Expert Comment

by:Daniel McAllister
ID: 24398145
Sounds like your domain controller doesn't like you....

More specifically, there may be a firewall or rule on the AD server that is blocking your request. (Of course, I am ASSUMING that your username & password correspond to a user on the domain that has domain admin rights).

Let me know what you find!

Dan
IT4SOHO
0
 
LVL 5

Accepted Solution

by:
random_ru earned 2000 total points
ID: 24422707
Xavier,

'First, make sure kerberos is installed:
# rpm -qa | grep krb
this should return at least 3 packages: krb5-devel, krb5-libs and krb5-workstation

Next, make sure the ldap development libraries are installed:
# rpm -qa | grep ldap-devel

If either of these returns nothing, you'll need to install them - which you can do from the Redhat CD.

make sure there's an entry for your active directory DC in your /etc/hosts file:
1.2.3.4 addc.example.com addc


Next, edit your /etc/krb5.conf to match your site. Everything should be fairly self-explanitory - and everything is case sensitive. Do not comment this file.

Once you've gotten to this point, you can try:
# /usr/kerberos/bin/kinit user@DOMAIN.COM
replacing *user* with a real user and DOMAIN.COM with a real domain (which must be UPPERCASE). If things are working, you'll be prompted for a password. If you enter the correct password, you'll come back to a bash shell, if not, you should be presented with:
"kinit(v5): Preauthentication failed while getting initial credentials"
or some such.

Note: If the clock time on the Linux machine is more than 5 minutes off from the time on the windows machine no ticket information will work. There are three wys to deal with this:
1. Have the Linux server act as a network time server, with the windows machine as a client
2. Have the windows machine act as a time server for the linux client
3. Make both systems pull the time from the same 3rd server ( some are listed here - http://ntp.isc.org/bin/view/Servers/NTPPoolServers )



Next, uninstall samba if it's installed:
# rpm -e samba

get the latest version of samba:
$ wget "http://us1.samba.org/samba/ftp/samba-latest.tar.gz"

expand and install samba:
Line number On/Off
Code: Select all
$ tar -zxvf samba*.tar.gz

$ cd samba-3.0.13

$ ./configure --prefix=/usr/local/samba --with-ldap --with-ads --with-krb5 --with-pam --with-winbind

# make && make install



In your smb.conf:
----8<-----
netbios name = LINUX_SERVER_NAME
realm = DOMAIN.COM
ads server = 123.123.123.123
security = ADS
encrypt passwords = yes
----8<-----

start samba:
# /etc/rc.d/init.d/smb start

To add the linux computer to the AD, you need to log into the DC and add it as a user with such privledges, so (from the Linux system):
# /usr/local/samba/bin/net ads join -U Administrator
it should prompt you for Administrator's password. Note that Administrator should be a user with the right to add a computer to the AD.

you should see something like:
Joined 'LINUX_MACHINE_NAME' to realm 'DOMAIN.COM'

To verify this worked, go to the windows DC and open Active Directory->Users and Computers and look for your linux machine to be listed there.

That's all you absolutely need to connect to the AD. If you want to map users to the AD (which is probably why you're doing this), open /etc/nsswitch.conf and change this:
passwd: files
shadow: files
group: files

to this:
passwd: compat winbind
shadow: compat
group: compat winbind

start the winbind daemon:
# winbindd

make sure it's running:
# ps -ae | grep winbindd

if nothing gets returned, you probably didn't configure samba with kerberos and ldap support. If it shows winbindd running, you're all set. To make sure everything starts on reboot:
open /etc/rc.d/init.d/smb and /etc/rc.d/init.d/winbindd and make sure the line:
# chkconfig: 345 NN NN
exixts (NN will be different numbers pertaining to priority), it should be on line 3 of both files. if these lines don't exist, add them. If they read:
# chkconfig: - NN NN
change the - to 345

save and close those files and run chkconfig:
# chkconfig smb reset
# chkconfig winbindd reset

you can check the runlevels they will start at with
# chkconfig smb --list
# chkconfig winbindd --list

That should about cover everything.' However, if the setup steps listed did not work, please refer to RedHat instructions for setup: http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/en-US/Reference_Guide/s3-samba-domain-member-ADS.html
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question