PDC + Samba, профили

Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС.

Модераторы: SLEDopit, Модераторы разделов

Sergeyural
Сообщения: 118

PDC + Samba, профили

Сообщение Sergeyural »

Здравствуйте, буквально на днях поставил PDC на Ubuntu и встала проблема с профилями она у меня была пол-года назад, я её решил тогда, но забыл записать пошаговое решение для себя.
Как сделать так чтобы создавались профили пользователей прямо на линуксовом контролере домена? а то они плодятся после кажного входа в компьютер в папке Documents and Settings.
При в входе пишется сообщение "не удалось найти серверную копию профиля, будет создан временный, ....тра-ля-ля..."

вобщем не знаю как создавать профили на сервере, а не локально.
Ну чтобы они создавались в компе а после выхода копировались на сервак и удалялись. Так правильней сказать наверное.

вот мой smb.conf на всякий случай:
.

Код:

[global] workgroup = linux 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 security = user encrypt passwords = true passdb backend = ldapsam:ldap://localhost/ obey pam restrictions = no ldap admin dn = cn=admin,dc=linux,dc=lan ldap suffix = dc=linux, dc=lan ldap group suffix = ou=Groups ldap user suffix = ou=Users ldap machine suffix = ou=Computers ldap idmap suffix = ou=Users ; Do ldap passwd sync ldap passwd sync = Yes passwd program = /usr/sbin/smbldap-passwd %u passwd chat = *New*password* %n\n *Retype*new*password* %n\n *all*authentication*tokens*updated* add user script = /usr/sbin/smbldap-useradd -m "%u" ldap delete dn = Yes delete user script = /usr/sbin/smbldap-userdel "%u" add machine script = /usr/sbin/smbldap-useradd -w "%u" add group script = /usr/sbin/smbldap-groupadd -p "%g" delete group script = /usr/sbin/smbldap-groupdel "%g" add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g" delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" "%g" set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u" domain logons = yes ; guest account = nobody ; invalid users = root # This boolean parameter controls whether Samba attempts to sync the Unix # password with the SMB password when the encrypted SMB password in the # passdb is changed. unix password sync = yes # For Unix password sync to work on a Debian GNU/Linux system, the following # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for # sending the correct chat script for the passwd program in Debian Sarge). passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . # This boolean controls whether PAM will be used for password changes # when requested by an SMB client instead of the program listed in # 'passwd program'. The default is 'no'. pam password change = yes # This option controls how nsuccessful authentication attempts are mapped # to anonymous connections map to guest = bad user ########## Domains ########### # Is this machine able to authenticate users. Both PDC and BDC # must have this setting enabled. If you are the BDC you must # change the 'domain master' setting to no # ; domain logons = yes # # The following setting only takes effect if 'domain logons' is set # It specifies the location of the user's profile directory # from the client point of view) # The following required a [profiles] share to be setup on the # samba server (see below) # Another common choice is storing the profile in the user's home directory logon path = \\%L\profile\%U # The following setting only takes effect if 'domain logons' is set # It specifies the location of a user's home directory (from the client # point of view) ; logon drive = H: ; logon home = \\%N\%U # The following setting only takes effect if 'domain logons' is set # It specifies the script to run during logon. The script must be stored # in the [netlogon] share # NOTE: Must be store in 'DOS' file format convention logon script = logon.cmd # This allows Unix users to be created on the domain controller via the SAMR # RPC pipe. The example command creates a user account with a disabled Unix # password; please adapt to your needs ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u ########## Printing ########## # If you want to automatically load your printer list rather # than setting them up individually then you'll need this ; load printers = yes # lpr(ng) printing. You may wish to override the location of the # printcap file ; printing = bsd ; printcap name = /etc/printcap # CUPS printing. See also the cupsaddsmb(8) manpage in the # cupsys-client package. ; printing = cups ; printcap name = cups ############ Misc ############ # Using the following line enables you to customise your configuration # on a per machine basis. The %m gets replaced with the netbios name # of the machine that is connecting ; include = /home/samba/etc/smb.conf.%m # Most people will find that this option gives better performance. # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html # for details # You may want to add the following on a Linux system: # SO_RCVBUF=8192 SO_SNDBUF=8192 socket options = TCP_NODELAY # The following parameter is useful only if you have the linpopup package # installed. The samba maintainer and the linpopup maintainer are # working to ease installation and configuration of linpopup and samba. ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' & # Domain Master specifies Samba to be the Domain Master Browser. If this # machine will be configured as a BDC (a secondary logon server), you # must set this to 'no'; otherwise, the default behavior is recommended. ; domain master = auto # Some defaults for winbind (make sure you're not using the ranges # for something else.) ; idmap uid = 10000-20000 ; idmap gid = 10000-20000 ; template shell = /bin/bash # The following was the default behaviour in sarge, # but samba upstream reverted the default because it might induce # performance issues in large organizations. # See Debian bug #368251 for some of the consequences of *not* # having this setting and smb.conf(5) for details. ; winbind enum groups = yes ; winbind enum users = yes # Setup usershare options to enable non-root users to share folders # with the net usershare command. # Maximum number of usershare. 0 (default) means that usershare is disabled. ; usershare max shares = 100 # Allow users who've been granted usershare privileges to create # public shares, not just authenticated ones usershare allow guests = yes #======================= Share Definitions ======================= # Un-comment the following (and tweak the other settings below to suit) # to enable the default home directory shares. This will share each # user's home directory as \\server\username [homes] comment = Home Directories browseable = no read only = no create mask = 0755 directory mask = 0755 valid users = %S [netlogon] comment = Network Logon Service path = /home/netlogon read only = yes share modes = no public = no writeable = no browsable = no # Un-comment the following and create the profiles directory to store # users profiles (see the "logon path" option above) # (you need to configure Samba to act as a domain controller too.) # The path below should be writable by all users so that their # profile directory may be created the first time they log on [profiles] comment = Users profiles path = /home/samba/profiles guest ok = no browseable = no create mask = 0600 directory mask = 0700 [printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = no read only = yes create mask = 0700 # Windows clients look for this share name as a source of downloadable # printer drivers [print$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = yes guest ok = no # Uncomment to allow remote administration of Windows print drivers. # Replace 'ntadmin' with the name of the group your admin users are # members of. ; write list = root, @ntadmin # A sample share for sharing your CD-ROM with others. ;[cdrom] ; comment = Samba server's CD-ROM ; read only = yes ; locking = no ; path = /cdrom ; guest ok = yes # The next two parameters show how to auto-mount a CD-ROM when the # cdrom share is accesed. For this to work /etc/fstab must contain # an entry like this: # # /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0 # # The CD-ROM gets unmounted automatically after the connection to the # # If you don't want to use auto-mounting/unmounting make sure the CD # is mounted on /cdrom # ; preexec = /bin/mount /cdrom ; postexec = /bin/umount /cdrom


P.S. если что-то неправилно написал не судите, я пишу это уже полусонный. :lazy2:
Спасибо сказали:
Аватара пользователя
Ленивая Бестолочь
Бывший модератор
Сообщения: 2760
ОС: Debian; gentoo

Re: PDC + Samba, профили

Сообщение Ленивая Бестолочь »

вы уверены, что вам нужны roaming profiles?
ваши юзера гарантировано не будут хранить много документов-музыки-видео...?

для того, чтобы избавиться от сообщения и устаканить локальные профили нужно поставить:
logon path =
Солнце садилось в море, а люди с неоконченным высшим образованием выбегали оттуда, думая, что море закипит.
Спасибо сказали:
Sergeyural
Сообщения: 118

Re: PDC + Samba, профили

Сообщение Sergeyural »

Ленивая Бестолочь писал(а):
01.07.2009 23:29
вы уверены, что вам нужны roaming profiles?
ваши юзера гарантировано не будут хранить много документов-музыки-видео...?

для того, чтобы избавиться от сообщения и устаканить локальные профили нужно поставить:
logon path =

это я знаю, но если пользователи не имеют своего личного компа то нужны только перемещаемые профили. Проблема в том что создаётся локаьно куча профилей, а нужно чтобы они создавались на сервере. Я не знаю как это сделать.
Спасибо сказали:
Аватара пользователя
danger08
Сообщения: 715
ОС: Linux (CentOS, Ubuntu)

Re: PDC + Samba, профили

Сообщение danger08 »

Sergeyural писал(а):
01.07.2009 22:59
Как сделать так чтобы создавались профили пользователей прямо на линуксовом контролере домена? а то они плодятся после кажного входа в компьютер в папке Documents and Settings.
При в входе пишется сообщение "не удалось найти серверную копию профиля, будет создан временный, ....тра-ля-ля..."

вобщем не знаю как создавать профили на сервере, а не локально.
Ну чтобы они создавались в компе а после выхода копировались на сервак и удалялись.

В общем, сценарий такой: если в Windows стоит опция "использовать перемещаемые профили" (а она стоит по умолчанию) - при входе пользователя в систему Windows пытается сгрузить перемещаемый профиль с DC. При отсутствии такового на DC, она создает на локальной машине профиль с нуля и работа пользователя идет в этом профиле (на DC пока ничего нет). Все это работает до момента выхода пользователя из системы, или до принудительной синхронизации пользовательских настроек.

В момент выхода пользователя из системы, производится синхронизация локального "наработанного" профиля пользователя с профилем пользователя на DC (опять-таки, если стоит опция "использовать перемещаемые профили"). То есть, только в этот момент на DC появляется профиль пользователя.

Автоматического удаления профиля пользователя, при выходе из системы, Windows не делает, вне зависимости от типа профиля (перемещаемый/не перемещаемый). Папки плодятся, но с другой стороны экономится время при повторном входе пользователя, на этой машине - требуется лишь частично синхронизовать имеющийся профиль.

Сообщение "не удалось найти серверный профиль...." скорее всего, свидетельствует о проблеме с правами (если профиль действительно отсутствует, то молча создается пустой профиль).
Блогосайт - http://www.fateyev.com
Спасибо сказали:
Sergeyural
Сообщения: 118

Re: PDC + Samba, профили

Сообщение Sergeyural »

danger08 писал(а):
02.07.2009 19:06
В момент выхода пользователя из системы, производится синхронизация локального "наработанного" профиля пользователя с профилем пользователя на DC (опять-таки, если стоит опция "использовать перемещаемые профили"). То есть, только в этот момент на DC появляется профиль пользователя.

Ок, как сделать чтобы они синхронизовались? что-то нифига этого не получается (
danger08 писал(а):
02.07.2009 19:06
Автоматического удаления профиля пользователя, при выходе из системы, Windows не делает, вне зависимости от типа профиля (перемещаемый/не перемещаемый). Папки плодятся, но с другой стороны экономится время при повторном входе пользователя, на этой машине - требуется лишь частично синхронизовать имеющийся профиль.

Сообщение "не удалось найти серверный профиль...." скорее всего, свидетельствует о проблеме с правами (если профиль действительно отсутствует, то молча создается пустой профиль).

Так.... а вообще никак не сделать чтобы они удалялись? а вот если у меня 1500 студентов? не хранить же 1500 * 30 МБ на 150 компьютерах?
С Новелом это проблема решается за 5 минут. Но дорогой этот новел, зараза.

Можно ли сделать на всех просто 1 профиль? как в новеле?
Спасибо сказали:
Аватара пользователя
skylin
Сообщения: 9
ОС: openSUSE

Re: PDC + Samba, профили

Сообщение skylin »

Ну во первых \\%L\profile\%U будет указывать на папку %U в шаре profile на сервере %L, тогда как у тебя такой шары нет а есть шара Profiles судя по твоему конфигу

[profiles]
comment = Users profiles
path = /home/samba/profiles
guest ok = no
browseable = no
create mask = 0600
directory mask = 0700

это раз. А два - проверь после исправления наличие этих самих профилей и права на них
Спасибо сказали:
Аватара пользователя
danger08
Сообщения: 715
ОС: Linux (CentOS, Ubuntu)

Re: PDC + Samba, профили

Сообщение danger08 »

Sergeyural писал(а):
06.07.2009 20:08
Так.... а вообще никак не сделать чтобы они удалялись? а вот если у меня 1500 студентов? не хранить же 1500 * 30 МБ на 150 компьютерах?
Никакой официальной информации по поводу автоматического удаления я не нашел. Видимо, это не предусмотрено. ИМХО.

Sergeyural писал(а):
06.07.2009 20:08
Можно ли сделать на всех просто 1 профиль? как в новеле?
Можно залогиниться под одним пользователем - одновременно с нескольких машин (если вы это имеете в виду).
Блогосайт - http://www.fateyev.com
Спасибо сказали:
Sergeyural
Сообщения: 118

Re: PDC + Samba, профили

Сообщение Sergeyural »

danger08 писал(а):
08.07.2009 13:24
Никакой официальной информации по поводу автоматического удаления я не нашел. Видимо, это не предусмотрено. ИМХО.


а я нашел )

Удаление кэшированных перемещаемых профилей

Если Вы озабочены размером дискового пространства на компьютерах, находящихся в местах общественного пользования, где тысячи людей могут входить в систему, то вас выручат групповые политики. Политика Удалять кэшированные копии перемещаемых профилей (Delete cached copies of roaming profiles), находящаяся в разделе Конфигурация компьютера\Административные шаблоны\Система\Профили пользователей (Computer Configuration\Administrative Templates\System\User Profiles) оснастки групповых политик, выполняет указанное действие по завершении сеанса.


http://www.oszone.net/print/3955/

спасибо всем за помощь!
Спасибо сказали: