Доброй ночи!
Ввел Ubuntu 9.04 в домен Win 2003. Теперь необходимо сделать автомонтирование на сетевые шары, чтобы юзер зашел под своей учеткой и сразу был доступ к файлам на шарах. Настроил pam_mount.conf.xml, но ничего не монтируется при перезагрузке. Вручную, при указании логина и пароля все работает на ура.
Что заметил: когда вручную понтирую. потом разлогиниваюсь, и опять захожу под учеткой (без перезагрузки компа) шары работают, при чем, и та, которую я вручную примонтировал, и та, которая прописана в pam_mount.conf.xml. Может кто подскажет чего или приведет рабочие конфиг файлы (кто такую же работу проделывал).
Вот логи успешного монтирования через pam_mount.conf.xml (который без перезагрузки)
Aug 12 16:38:05 lin1 gdm[3409]: pam_mount(pam_mount.c:521): about to perform mount operations
Aug 12 16:38:05 lin1 gdm[3409]: pam_mount(mount.c:299): Mount info: globalconf, user=maks <volume server="192.168.0.22" path="inet$" mountpoint="/mnt/123" cipher="(null)" fskeypath="(null)" fskeycipher="(null)" fskeyhash="(null)" options="iocharset=utf8" /> fstab=0
Aug 12 16:38:05 lin1 gdm[3409]: pam_mount(mount.c:146): realpath of volume "/mnt/123" is "/mnt/123"
Aug 12 16:38:05 lin1 gdm[3409]: pam_mount(mount.c:150): checking to see if //192.168.0.22/inet$ is already mounted at /mnt/123
Aug 12 16:38:05 lin1 gdm[3409]: pam_mount(mount.c:644): checking for encrypted filesystem key configuration
Aug 12 16:38:05 lin1 gdm[3409]: pam_mount(mount.c:647): about to start building mount command
Aug 12 16:38:05 lin1 gdm[3409]: command: [mount] [-t] [cifs] [//192.168.0.22/inet$] [/mnt/123] [-o] [user=maks,uid=11010,gid=10000,iocharset=utf8]
Aug 12 16:38:05 lin1 gdm[3430]: pam_mount(misc.c:48): set_myuid<pre>: (uid=0, euid=0, gid=10000, egid=10000)
Aug 12 16:38:05 lin1 gdm[3430]: pam_mount(misc.c:48): set_myuid<post>: (uid=0, euid=0, gid=10000, egid=10000)
Aug 12 16:38:05 lin1 gdm[3409]: pam_mount(mount.c:680): waiting for mount
Aug 12 16:38:05 lin1 gdm[3409]: command: [pmvarrun] [-u] [maks] [-o] [1]
и неудачного (после ребута)
Aug 12 16:35:20 lin1 gdm[2702]: pam_mount(pam_mount.c:521): about to perform mount operations
Aug 12 16:35:20 lin1 gdm[2702]: pam_mount(mount.c:299): Mount info: globalconf, user=maks <volume server="192.168.0.22" path="inet$" mountpoint="/mnt/123" cipher="(null)" fskeypath="(null)" fskeycipher="(null)" fskeyhash="(null)" options="iocharset=utf8" /> fstab=0
Aug 12 16:35:20 lin1 gdm[2702]: pam_mount(mount.c:146): realpath of volume "/mnt/123" is "/mnt/123"
Aug 12 16:35:20 lin1 gdm[2702]: pam_mount(mount.c:150): checking to see if //192.168.0.22/inet$ is already mounted at /mnt/123
Aug 12 16:35:20 lin1 gdm[2702]: pam_mount(mount.c:644): checking for encrypted filesystem key configuration
Aug 12 16:35:20 lin1 gdm[2702]: pam_mount(mount.c:647): about to start building mount command
Aug 12 16:35:20 lin1 gdm[2702]: command: [mount] [-t] [cifs] [//192.168.0.22/inet$] [/mnt/123] [-o] [user=maks,uid=11010,gid=10000,iocharset=utf8]
Aug 12 16:35:20 lin1 gdm[3019]: pam_mount(misc.c:48): set_myuid<pre>: (uid=0, euid=0, gid=10000, egid=10000)
Aug 12 16:35:20 lin1 gdm[3019]: pam_mount(misc.c:48): set_myuid<post>: (uid=0, euid=0, gid=10000, egid=10000)
Aug 12 16:35:20 lin1 gdm[2702]: pam_mount(mount.c:80): mount errors:
Aug 12 16:35:20 lin1 gdm[2702]: pam_mount(mount.c:83): mount: блочное устройство //192.168.0.22/inet$ защищен от записи, монтируется только для чтения
Aug 12 16:35:20 lin1 gdm[2702]: pam_mount(mount.c:83): mount: невозможно примонтировать блочное устройство //192.168.0.22/inet$ только для чтения
Aug 12 16:35:20 lin1 gdm[2702]: pam_mount(mount.c:680): waiting for mount
Aug 12 16:35:20 lin1 gdm[2702]: pam_mount(pam_mount.c:524): mount of inet$ failed
Aug 12 16:35:20 lin1 gdm[2702]: command: [pmvarrun] [-u] [maks] [-o] [1]
/etc/pam.d/common-authauth required pam_mount.so
auth optional pam_group.so
auth sufficient pam_unix.so nullok_secure use_first_pass
auth sufficient pam_winbind.so use_first_pass krb5_auth krb5_ccache_type=FILE debug
auth required pam_deny.so
/etc/pam.d/common-accountaccount sufficient pam_winbind.so
account required pam_unix.so
/etc/pam.d/common-passwordpassword sufficient pam_unix.so nullok obscure md5
password sufficient pam_winbind.so
/etc/pam.d/common-sessionsession required pam_winbind.so
session required pam_unix.so
session required pam_mkhomedir.so umask=0022 skel=/etc/skel
session optional pam_foreground.so
etc/pam.d/sudo #%PAM-1.0
auth sufficient pam_winbind.so
auth sufficient pam_unix.so use_first_pass
auth required pam_deny.so
@include common-account
/etc/pam.d/gdm#%PAM-1.0
auth requisite pam_nologin.so
auth required pam_env.so
@include common-auth
@include common-account
session required pam_limits.so
@include common-session
#session required pam_mount.so use_first_pass
@include common-pammount
session required pam_mkhomedir.so umask=0022 skel=/etc/skel
@include common-password
/etc/nsswitch.confpasswd: compat winbind
group: compat winbind
shadow: compat
hosts: files dns
networks: files dns
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: files winbind
быть может проблема в PAM модулях? не тот порядок или не то написал.
Пользователь решил продолжить мысль 12 Августа 2009, 21:03:58:
Вот smb.conf
[global]
unix charset = UTF-8
dos charset = CP866
display charset = UTF-8
workgroup = FLO
server string = %h server (Samba, Ubuntu)
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
# вот тут мы показываем, что используем AD
security = ads
# если стоит * то samba сама будет искать домен контроллер через dc, или же можно перечислить их IP адреса через пробел в явном виде. Или указать один #IP для того dc на котором хотите авторизоваться. Для отказоустойчивости лучше указать несколько dc или *
password server = *
realm = FIRMA.RU
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
invalid users = root
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword :* %n\n *passwd:*password\supdated\ssuccessfully* .
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
idmap uid = 10000-20000
idmap gid = 10000-20000
template shell = /bin/bash
winbind enum groups = yes
winbind enum users = yes
#домашняя папку у пользователя будет в папке с именем домена. Лучше ее создать заранее вручную.
template homedir = /home/%D/%U
client use spnego = yes
winbind use default domain = yes
winbind refresh tickets = yes
restrict anonymous = 2
# строки ниже, чтобы рабочая станция не пыталась стать обозревателем в сети.
domain master = no
local master = no
preferred master = no
os level = 0
unix extensions = no
wide links = yes
follow symlinks = yes
####################################
[data]
browseable = yes
writeable = yes
write list = @”FLO\Domain Admins”
path = /home/data
create mask = 0664
comment = test share
directory mask = 0777
valid users = @”FLO\Domain Admins”
####################################
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
[cdrom]
comment = Samba server’s CD-ROM
read only = yes
locking = no
path = /cdrom
guest ok = yes
+ используется керберос
[libdefaults]
default_realm = FIRMA.RU
ticket_lifetime = 24000
clock_skew = 300
# The following krb5.conf variables are only for MIT Kerberos.
krb4_config = /etc/krb.conf
krb4_realms = /etc/krb.realms
kdc_timesync = 1
ccache_type = 4
forwardable = true
proxiable = true
v4_instance_resolve = false
v4_name_convert = {
host = {
rcmd = host
ftp = ftp
}
plain = {
something = something-else
}
}
fcc-mit-ticketflags = true
[realms]
FIRMA.RU = {
kdc = office.firma.ru
admin_server = office.firma.ru
}
[domain_realm]
.firma.ru = FIRMA.RU
firma.ru = FIRMA.RU
[login]
krb4_convert = true
krb4_get_tickets = false
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5dc.log
admin_server = FILE:/var/log/ksadmind.log