# How to add to Active Directory

## treyb

Hello,  I have a gentoo machine that I want to add to active directory at a major university.  I want to be able to log in with a AD account and have file sharing.  I followed http://en.gentoo-wiki.com/wiki/Active_Directory_with_Samba_and_Winbind  as a guide and I keep getting the doesnt have a domain name.

I set up DHCP with dhcpcd –h <hostname> -d eth0 and the DNS name it set up on the DNS server.

This is what I have for the host names.

```
 /etc/hosts

10.242.32.247 at-treylinux.at.ufl.edu at-treylinux

/etc/conf.d/hostname

# Set to the hostname of this machine

hostname="at-treylinux"

```

This is some of the config files

```

~ # cat /etc/conf.d/net

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /usr/share/doc/openrc/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

dns_domain_lo="at.ufl.edu"

/etc/conf.d/ntp-client

NTPCLIENT_CMD="sntp"

#NTPCLIENT_OPTS="-s -b -u ntps2-1.server.ufl.edu"

NTPCLIENT_OPTS="-p \

         0.us.pool.ntp.org 1.us.pool.ntp.org \

         2.us.pool.ntp.org 3.us.pool.ntp.org"

/etc/krb5.conf

[logging]

default = FILE:/var/log/krb5.log

[libdefaults]

   ticket_lifetime = 600

   clock_skew = 300

   default_realm = AD.UFL.EDU

   kdc_timesync = 1

   ccache_type = 4

   forwardable = true

   proxiable = true

[realms]

   AD.UFL.EDU = {

       kdc = ufdc01.ad.ufl.edu:88

       admin_server = ufdc01.ad.ufl.edu:464

       default_domain = AD.UFL.EDU

}

[domain_realm]

   .AD.UFL.EDU = AD.UFL.EDU

   AD.UFL.EDU = AD.UFL.EDU

[kdc]

        profile = /etc/krb5kdc/kdc.conf

[logging]

        kdc = FILE:/var/log/krb5kdc.log

        admin_server = FILE:/var/log/kadmin.log

        default = FILE:/var/log/krb5lib.log

```

/etc/samba/smb.conf

```

[global]

        workgroup = UFAD

        server string = Samba Server %v

        load printers = no

        log file = /var/log/samba3/log.%m

        max log size = 50

        interfaces = lo eth0

        bind interfaces only = Yes

        hosts allow = 10.242.32.

        hosts deny = 0.0.0.0/0

        encrypt passwords = yes

        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

        dns proxy = no

        smb ports = 139

        security = ADS

        realm = AD.UFL.EDU

        password server = 10.5.187.250

        winbind separator = /

        idmap uid = 10000-20000

        idmap gid = 10000-20000

        winbind enum users = yes

        winbind enum groups = yes

        template homedir = /home/%D/%U

        template shell = /bin/zsh

        client use spnego = yes

        client ntlmv2 auth = yes

        winbind use default domain = yes

        restrict anonymous = 2

        domain master = no

        local master = no

        preferred master = no

        os level = 0

        disable netbios = no

        dos charset = ASCII

        unix charset = UTF8

        display charset = UTF8

        #Uncomment if your domain controller requires LDAP signing.

        #client ldap sasl wrapping = seal

```

Can someone please Let me know what I am doing wrong?

----------

## treyb

Anyone at all?

----------

## Deathwing00

Moved from Installing Gentoo to Networking & Security.

----------

## treyb

Can anyone help me with this at all?

----------

