ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
* [Sysadmins] Samba с security=server и доступ гостя
@ 2009-03-19  9:33 Денис Ягофаров
  0 siblings, 0 replies; only message in thread
From: Денис Ягофаров @ 2009-03-19  9:33 UTC (permalink / raw)
  To: ALT Linux sysadmin discuss

[-- Attachment #1: Type: text/plain, Size: 4279 bytes --]

Добрый день.

Так получилось, что нужно сделать файловое хранилище с авторизацией для 
одних папок и гостевым доступом для других. Т.к. создавать для кучи 
пользователей учётные записи (да ещё с паролями) лень, я решил 
использовать (с пониманием, надеюсь, всех недостатков и рисков):

security=server
password server = 192.168.1.4
encrypt passwords = yes

Создал пользователей (т.к., согласно мануалу и практике, никто за меня 
их не создаст в этом случае) и группы. Когда я пытаюсь авторизироваться 
как нормальный пользователь, меня пускают. Когда ввожу guest (в форточках):

C:\Documents and Settings\я>net use /user:guest \\192.168.1.5\public
Недействительные пароль или имя пользователя для \\192.168.1.5\public.
Введите пароль для 'guest' для подключения к '192.168.1.5':
Системная ошибка 1326.
Вход в систему не произведен: имя пользователя или пароль не опознаны.

На самбе в логи идёт:
[2009/03/19 11:10:52, 2] smbd/sesssetup.c:setup_new_vc_session(1212)
  setup_new_vc_session: New VC == 0, if NT4.x compatible we would close 
all old resources.
[2009/03/19 11:10:52, 2] smbd/sesssetup.c:setup_new_vc_session(1212)
  setup_new_vc_session: New VC == 0, if NT4.x compatible we would close 
all old resources.
[2009/03/19 11:10:52, 1] auth/auth_server.c:check_smbserver_security(368)
  password server 192.168.1.4 gave us guest only
[2009/03/19 11:10:52, 2] auth/auth.c:check_ntlm_password(319)
  check_ntlm_password:  Authentication for user [guest] -> [guest] 
FAILED with error NT_STATUS_LOGON_FAILURE
*** после нажатия на ввод, вместо пароля ***
[2009/03/19 11:11:41, 1] auth/auth_server.c:check_smbserver_security(368)
  password server 192.168.1.4 gave us guest only
[2009/03/19 11:11:41, 2] auth/auth.c:check_ntlm_password(319)
  check_ntlm_password:  Authentication for user [guest] -> [guest] 
FAILED with error NT_STATUS_LOGON_FAILURE

Видимо, самбу расстраивает "password server 192.168.1.4 gave us guest 
only". Тем не менее, если попробовать зайти по smbclient, то:

# /usr/bin/smbclient -U guest   \\\\192.168.1.5\\public
Password:
Anonymous login successful
Domain=[ITC] OS=[Unix] Server=[Samba 3.0.33]
smb: \>

На сервере:

[2009/03/19 11:15:30, 1] auth/auth_server.c:check_smbserver_security(368)
  password server 192.168.1.4 gave us guest only
[2009/03/19 11:15:30, 2] auth/auth.c:check_ntlm_password(319)
  check_ntlm_password:  Authentication for user [guest] -> [guest] 
FAILED with error NT_STATUS_LOGON_FAILURE
[2009/03/19 11:15:30, 1] smbd/service.c:make_connection_snum(1033)
  litium (10.3.0.12) connect to service public initially as user guest 
(uid=506, gid=511) (pid 20083)

Тем не менее "password server 192.168.1.4 gave us guest only" никого не 
останавливает....

Пользователь guest есть:
# cat /etc/passwd | grep guest
guest:x:506:511::/dev/null:/bin/false

Вопрос: как заставить самбу "правильно" реагировать на попытки форточек 
зайти на шару... т.е. пропустить guest'а без пароля?

Конфиг:
[global]
        workgroup = ITC
        netbios name = STORE
        server string = Samba store test
        security = SERVER
        encrypt passwords = yes
        password server = 192.168.1.4
        guest account = guest
        log level = 2
        log file = /var/log/samba/allclients.log
        load printers = No
        printcap name = cups
        local master = No
        dns proxy = No
        use sendfile = Yes

[public]
        comment = BACK_UPS
        path = /mnt/DOC
        read only = No
        guest ok = Yes


[-- Attachment #2: denyago.vcf --]
[-- Type: text/x-vcard, Size: 363 bytes --]

begin:vcard
fn:Denis Timurovich Yagofarov
n:Yagofarov;Denis Timurovich
org:ITGIS NASU
adr:room 615;;Chokolovski blvdr., 13;Kiev;;03151;Ukraine
email;internet:denyago@rambler.ru
title:system administrator
tel;work:80442480755
note;quoted-printable:xmmp: denyago@gmail.com=0D=0A=
	xmmp: diyago@jabber.te.ua
x-mozilla-html:FALSE
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-19  9:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-19  9:33 [Sysadmins] Samba с security=server и доступ гостя Денис Ягофаров

ALT Linux sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git