LINUX.ORG.RU
ФорумAdmin

Перенос samba пользователей

 


0

3

Дано: машина под CentOS5 c кучей samba пользователей
ls -al /etc/samba
-rw-r--r-- 1 root root 20 Авг 30 2011 lmhosts
-rw------- 1 root root 176128 Мар 20 17:16 passdb.tdb
-rw------- 1 root root 8192 Сен 12 2011 secrets.tdb
-rw-r--r-- 1 root root 9833 Сен 13 2011 smb.conf
-rw-r--r-- 1 root root 97 Авг 23 2011 smbusers

Надо: перенести тех же пользователей на новый сервер под CentOS6.2
Достаточно ли просто скопировать эти файлы? Через smb - один из вариантов доступа к домашним каталогам пользователей на сервере. Как грамотно организовать миграцию?


Ответ на: комментарий от zgen

# cat /etc/samba/smb.conf
#======================= Global Settings =====================================

[global]

workgroup = РАБОЧАЯ_ГРУППА
server string = ИМЯ_СЕРВЕРА
null passwords = yes

; netbios name = MYSERVER

; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
; hosts allow = 127. 192.168.12. 192.168.13.

# --------------------------- Logging Options -----------------------------
#
# Log File let you specify where to put logs and how to split them up.
#
# Max Log Size let you specify the max size log files should reach

# logs split per machine
; log file = /var/log/samba/%m.log
# max 50KB per log file, then rotate
; max log size = 50

# ----------------------- Standalone Server Options ------------------------
#
# Security can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.

security = user
passdb backend = tdbsam




; realm = MY_REALM

; password server = <NT-Server-Name>


; domain master = yes
; domain logons = yes

# the login script name depends on the machine name
; logon script = %m.bat
# the login script name depends on the unix user used
; logon script = %u.bat
; logon path = \\%L\Profiles\%u
# disables profiles support by specifing an empty path
; logon path =

; add user script = /usr/sbin/useradd «%u» -n -g users
; add group script = /usr/sbin/groupadd «%g»
; add machine script = /usr/sbin/useradd -n -c «Workstation (%u)» -M -d /nohome -s /bin/false «%u»
; delete user script = /usr/sbin/userdel «%u»
; delete user from group script = /usr/sbin/userdel «%u» «%g»
; delete group script = /usr/sbin/groupdel «%g»


# ----------------------- Browser Control Options ----------------------------
; local master = no
; os level = 33
; preferred master = yes

#----------------------------- Name Resolution -------------------------------
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups.

; wins support = yes
; wins server = w.x.y.z
; wins proxy = yes

; dns proxy = yes

# --------------------------- Printing Options -----------------------------

; load printers = yes
cups options = raw

; printcap name = /etc/printcap
#obtain list of printers automatically on SystemV
; printcap name = lpstat
; printing = cups

# --------------------------- Filesystem Options ---------------------------

; map archive = no
; map hidden = no
; map read only = no
; map system = no
username map = /etc/samba/smbusers
; encrypt passwords = yes
guest ok = yes
guest account = guest
; store dos attributes = yes


#============================ Share Definitions ==============================

[homes]
comment = Home Directories
browseable = no
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
; guest ok = no
; writable = No
printable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
; [Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes


# A publicly accessible directory, but read only, except for people in
# the «staff» group
; [public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff

[public]
path = /home/public
; writeable = No
; browseable = yes
guest ok = yes

array
() автор топика
Ответ на: комментарий от array

Еще системных пользователей переносить надо (каждому samba пользователю соответствует системный) ну и права поправить, если uid/gid перенесенных пользователей на новой системе будут другие.

zgen ★★★★★
()
Ответ на: комментарий от zgen

Пользователей перенёс, NIS+NFS работает. А вот с самбой хуже. Невозможно добавить пользователя.

smbpasswd -a ЮЗВЕРЬ
New SMB password:
Retype new SMB password:
Failed to add entry for user ЮЗВЕРЬ

smbd не стартовал, пока не закомментировал в конфиге строчки про guest

array
() автор топика
Ответ на: комментарий от array

Невозможно добавить пользователя.

Это проблемы, которые с большой вероятностью к переносу пользователей отношения не имеют.

zgen ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.