astralinux в домене windows 2003

gotovtsev

New member
Сообщения
14
#1
Добрый день!

Хочу попробовать использовать astralinux в качестве файлового сервера в домене windows 2003.
Согласно мануалу ввел астру в домен. Затем пробую настроить samba и всё прочее как описывается в этом мануале.

Проблема возникла с настройкой kerberos. При проверке kinit administrator@REGISTRYOFFICE система выводит
сообщение: kinit: KDC has no support for encryption type while getting initial credentials.


При попытке зайти на комп с астралинукс из домена, сам компьютер открывается но расшаренную папку открыть не получается -
система запрашивает логин и пароль.

Судя по всему загвоздка именно в настройках kerberos. Может кто-то сможет помочь в решении данной проблемы? :)

Содержимое файла krb5.conf
Код:
#astra-winbind
[libdefaults]
    default_realm = REGISTRYOFFICE
    kdc_timesync = 1
    ccache_type = 4
    forwardable = true
    proxiable = true
    fcc-mit-ticketflags = true
#    dns_lookup_realm = false
#    dns_lookup_kdc = true
    v4_instance_resolve = false
    v4_name_convert = {
        host = {
            rcmd = host
            ftp = ftp
        }
        plain = {
            something = something-else
        }
    }

[realms]
    REGISTRYOFFICE = {
    admin_server = SERVER.REGISTRYOFFICE
    default_domain = REGISTRYOFFICE
    }

[domain_realm]
    .registryoffice = REGISTRYOFFICE
    registryoffice = REGISTRYOFFICE
[login]
    krb4_convert = true
    krb4_get_tickets = false
Содержимое файла smb.conf
Код:
#astra-winbind
[global]
    server string = Astra linux
    interfaces = eth0
    usershare allow guests = Yes
    map to guest = Bad User
    obey pam restrictions = Yes
    pam password change = Yes
    passdb backend = tdbsam
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    passwd program = /usr/bin/passwd %u
    server role = standalone server
    unix password sync = Yes

    workgroup = REGISTRYOFFICE
    realm = REGISTRYOFFICE
    security = ADS
    encrypt passwords = true
    dns proxy = no
    socket options = TCP_NODELAY
    domain master = no
    local master = no
    preferred master = no
    os level = 0
    domain logons = no
    load printers = no
    show add printer wizard = no
    printcap name = /dev/null
    disable spoolss = yes
    idmap config * : range = 3000-7999
    idmap config * : backend = tdb
    idmap config REGISTRYOFFICE : range = 10000-299999
    idmap config REGISTRYOFFICE : backend = rid
    winbind nss info = rfc2307
    winbind enum groups = no
    winbind enum users = no
    winbind use default domain = yes
    template homedir = /home/%D/%U
    template shell = /bin/bash
    winbind refresh tickets = yes
    winbind offline logon = yes
    winbind cache time = 1440
    password server server
    winbind refresh tickets = true
    unix charset = UTF8
    dos charset = CP866

#[homes]
#    comment = Home Directories
#    browseable = No
#    create mask = 0700
#    directory mask = 0700
#    valid users = %S

[printers]
    comment = All Printers
    path = /var/spool/samba
    browseable = No
    printable = Yes
    create mask = 0700

[print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers

[backup]
    path = /mnt/backup/share
    valid users = @WORKGROUP\astralinux
    write list = @WORKGROUP\astralinux
    read only = No
    create mask = 0777
    directory mask = 0777

[CODE]#astra-winbind
[global]
    server string = Astra linux
    interfaces = eth0
    usershare allow guests = Yes
    map to guest = Bad User
    obey pam restrictions = Yes
    pam password change = Yes
    passdb backend = tdbsam
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    passwd program = /usr/bin/passwd %u
    server role = standalone server
    unix password sync = Yes

    workgroup = REGISTRYOFFICE
    realm = REGISTRYOFFICE
    security = ADS
    encrypt passwords = true
    dns proxy = no
    socket options = TCP_NODELAY
    domain master = no
    local master = no
    preferred master = no
    os level = 0
    domain logons = no
    load printers = no
    show add printer wizard = no
    printcap name = /dev/null
    disable spoolss = yes
    idmap config * : range = 3000-7999
    idmap config * : backend = tdb
    idmap config REGISTRYOFFICE : range = 10000-299999
    idmap config REGISTRYOFFICE : backend = rid
    winbind nss info = rfc2307
    winbind enum groups = no
    winbind enum users = no
    winbind use default domain = yes
    template homedir = /home/%D/%U
    template shell = /bin/bash
    winbind refresh tickets = yes
    winbind offline logon = yes
    winbind cache time = 1440
    password server server
    winbind refresh tickets = true
    unix charset = UTF8
    dos charset = CP866

#[homes]
#    comment = Home Directories
#    browseable = No
#    create mask = 0700
#    directory mask = 0700
#    valid users = %S

[printers]
    comment = All Printers
    path = /var/spool/samba
    browseable = No
    printable = Yes
    create mask = 0700

[print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers

[backup]
    path = /mnt/backup/share
    valid users = @WORKGROUP\astralinux
    write list = @WORKGROUP\astralinux
    read only = No
    create mask = 0777
    directory mask = 0777
 

gotovtsev

New member
Сообщения
14
#2
Модифицировал файл krb5.conf добавив в него:
default_tgs_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 RC4-HMAC DES-CBC-CRC DES3-CBC-SHA1 DES-CBC-MD5
default_tkt_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 RC4-HMAC DES-CBC-CRC DES3-CBC-SHA1 DES-CBC-MD5
preferred_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 RC4-HMAC DES-CBC-CRC DES3-CBC-SHA1 DES-CBC-MD5


#astra-winbind
[libdefaults]
default_realm = REGISTRYOFFICE
kdc_timesync = 1
ccache_type = 4
forwardable = true
proxiable = true
fcc-mit-ticketflags = true
dns_lookup_realm = false
dns_lookup_kdc = true
v4_instance_resolve = false
v4_name_convert = {
host = {
rcmd = host
ftp = ftp
}
plain = {
something = something-else
}
}

default_tgs_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 RC4-HMAC DES-CBC-CRC DES3-CBC-SHA1 DES-CBC-MD5
default_tkt_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 RC4-HMAC DES-CBC-CRC DES3-CBC-SHA1 DES-CBC-MD5
preferred_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 RC4-HMAC DES-CBC-CRC DES3-CBC-SHA1 DES-CBC-MD5

[realms]
REGISTRYOFFICE = {
kdc = SERVER.REGISTRYOFFICE
admin_server = SERVER.REGISTRYOFFICE
default_domain = REGISTRYOFFICE
}

[domain_realm]
.registryoffice = REGISTRYOFFICE
registryoffice = REGISTRYOFFICE
[login]
krb4_convert = true
krb4_get_tickets = false

Тем не менее, астралинукс так и не пускает в расшаренную папку и трбует авторизации... :((
 

gotovtsev

New member
Сообщения
14
#3
В общем после различных манипуляций с конфигурационными файлами похоже что всё заработало примерно так, как на данном этапе требуется.
Комп с астралинукс входит в состав домена windows 2003, на компе открыт доступ к двум папкам, одна из них открыта для всех, другая для определенной
группы из домена.


В качестве полезных ссылок для настройки могу сообщить такие:

https://wiki.astralinux.ru/display/doc/Samba
https://wiki.astralinux.ru/pages/viewpage.action?pageId=27361515
https://www.sysadminwiki.ru/wiki/Linux_в_домене_Active_Directory
https://help.ubuntu.ru/wiki/ввод_в_домен_windows

Мои рабочие конфиги для примера:

файл smb.conf:
Код:
#astra-winbind
[global]
    server string = Astra linux
    usershare allow guests = Yes
    map to guest = Bad User
    obey pam restrictions = Yes
    pam password change = Yes
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    passwd program = /usr/bin/passwd %u
    server role = standalone server
    unix password sync = Yes

    workgroup = REGISTRYOFFICE
    realm = REGISTRYOFFICE
    security = ADS
    encrypt passwords = true
    dns proxy = no
    socket options = TCP_NODELAY
    domain master = no
    local master = no
    preferred master = no
    os level = 0
    domain logons = no
    load printers = no
    show add printer wizard = no
    printcap name = /dev/null
    disable spoolss = yes
    idmap config * : range = 3000-7999
    idmap config * : backend = tdb
    idmap config REGISTRYOFFICE : range = 10000-299999
    idmap config REGISTRYOFFICE : backend = rid
    winbind nss info = rfc2307
    winbind enum groups = yes
    winbind enum users = yes
    winbind use default domain = yes
    template homedir = /home/%D/%U
    template shell = /bin/bash
    winbind refresh tickets = yes
    winbind offline logon = yes
    winbind cache time = 1440
    password server server
    winbind refresh tickets = true
    unix charset = UTF8
    dos charset = CP866

#[homes]
#    comment = Home Directories
#    browseable = No
#    create mask = 0700
#    directory mask = 0700
#    valid users = %S

[backup]
    path = /mnt/backup/backup
    valid users = @REGISTRYOFFICE\astralinux
    write list = @REGISTRYOFFICE\astralinux
    read only = No
    create mask = 0777
    directory mask = 0777
    
[share]
    path = /mnt/backup/share
    read only = No
    create mask = 0777
    directory mask = 0777

[printers]
    comment = All Printers
    path = /var/spool/samba
    browseable = No
    printable = Yes
    create mask = 0700

[print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers
файл nsswitch.conf:
Код:
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd: compat winbind
group: compat winbind
shadow:         compat

#hosts: files dns
hosts: dns mdns4_minimal[NotFoud=return] mdns4 files
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis
файл krb5.conf:
Код:
#astra-winbind
[libdefaults]
    default_realm = REGISTRYOFFICE
    kdc_timesync = 1
    ccache_type = 4
    forwardable = true
    proxiable = true
    fcc-mit-ticketflags = true
    dns_lookup_realm = false
    dns_lookup_kdc = true
    v4_instance_resolve = false
    v4_name_convert = {
        host = {
            rcmd = host
            ftp = ftp
        }
        plain = {
            something = something-else
        }
    }

default_tgs_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 RC4-HMAC DES-CBC-CRC DES3-CBC-SHA1 DES-CBC-MD5
default_tkt_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 RC4-HMAC DES-CBC-CRC DES3-CBC-SHA1 DES-CBC-MD5
preferred_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 RC4-HMAC DES-CBC-CRC DES3-CBC-SHA1 DES-CBC-MD5    
    
[realms]
    REGISTRYOFFICE = {
    admin_server = SERVER.REGISTRYOFFICE
    default_domain = REGISTRYOFFICE
    }

[domain_realm]
    .registryoffice = REGISTRYOFFICE
    registryoffice = REGISTRYOFFICE
[login]
    krb4_convert = false
    krb4_get_tickets = false
 

CrashBldash

New member
Сообщения
250
#4
Ваш метод ввода в домен АД через fly-admin-ad-client устарел. Т.к. он использует винбинд.
Используйте sssd через fly-admin-ad-sssd-client