ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] OpenVZ & smbnetfs & FreeNX
@ 2009-07-22  9:37 Шигапов Ринат
  2009-07-22 10:42 ` Boris Savelev
  0 siblings, 1 reply; 4+ messages in thread
From: Шигапов Ринат @ 2009-07-22  9:37 UTC (permalink / raw)
  To: ALT Linux Community general discussions

Доброго времени суток.

Пытаюсь найти лазейку для организации доступа к SMB-ресурсам 
FreeNX-клиента внутри OpenVZ. Bind-монтирование из HN не устраивает. 
Т.к. внутри VE монтировать cifs/smb пока нельзя, пытаюсь разобраться с 
userspace-решениями - fuse-smb или smbnetfs. Кто-нибудь что-то делал в 
этом направлении?

-- 
С уважением,
        Шигапов Ринат
        инженер-программист ООО "Невод"
        тел. (342)2196960
        JabberID: dxist эт ya.ru 
				



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Comm] OpenVZ & smbnetfs & FreeNX
  2009-07-22  9:37 [Comm] OpenVZ & smbnetfs & FreeNX Шигапов Ринат
@ 2009-07-22 10:42 ` Boris Savelev
  2009-07-24  9:58   ` Шигапов Ринат
  0 siblings, 1 reply; 4+ messages in thread
From: Boris Savelev @ 2009-07-22 10:42 UTC (permalink / raw)
  To: ALT Linux Community general discussions

22 июля 2009 г. 13:37 пользователь Шигапов Ринат (srk@nevod.ru) написал:
> Доброго времени суток.
>
> Пытаюсь найти лазейку для организации доступа к SMB-ресурсам FreeNX-клиента
> внутри OpenVZ. Bind-монтирование из HN не устраивает. Т.к. внутри VE
> монтировать cifs/smb пока нельзя, пытаюсь разобраться с userspace-решениями
> - fuse-smb или smbnetfs. Кто-нибудь что-то делал в этом направлении?

вариант с fuse вполне ничего.
пишется врапер с mount на соотв. команду fuse, если надо
меняется COMMAND_SMBMOUNT_CIFS в node.conf
и все, скорее всего, получится.


-- 
Boris

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Comm] OpenVZ & smbnetfs & FreeNX
  2009-07-22 10:42 ` Boris Savelev
@ 2009-07-24  9:58   ` Шигапов Ринат
  2009-07-29 10:31     ` Шигапов Ринат
  0 siblings, 1 reply; 4+ messages in thread
From: Шигапов Ринат @ 2009-07-24  9:58 UTC (permalink / raw)
  To: ALT Linux Community general discussions

Полученное решение:

В node.conf:

SAMBA_MOUNT_SHARE_PROTOCOL="smbfs"
ENABLE_SAMBA_PRELOAD="1"
COMMAND_SMBMOUNT=/usr/local/bin/mountsmb
COMMAND_SMBUMOUNT=/usr/local/bin/umountsmb

Врапперы:

[root@nxServer nxserver]# cat /usr/local/bin/mountsmb
#!/bin/bash
/usr/local/bin/redirect445 -I $NXSAMBA_PORT
mkdir ~/tmp/smbnetfs
ln -sf ~/tmp/smbnetfs/127.0.0.1 ~/Desktop/MyShares
smbnetfs ~/tmp/smbnetfs

[root@nxServer nxserver]# cat /usr/local/bin/umountsmb
#!/bin/bash
/usr/local/bin/redirect445 -D $NXSAMBA_PORT
fusermount -u ~/tmp/smbnetfs

[root@nxServer nxserver]# cat /usr/local/bin/redirect445
#!/bin/bash

/sbin/iptables -t nat $1 OUTPUT -p tcp --dport 445 -j REDIRECT --to-ports $2

Для работы nat в ve подгрузил модуль iptables_nat.

-- 
С уважением,
        Шигапов Ринат
        инженер-программист ООО "Невод"
        тел. (342)2196960
        JabberID: dxist эт ya.ru 
				



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Comm] OpenVZ & smbnetfs & FreeNX
  2009-07-24  9:58   ` Шигапов Ринат
@ 2009-07-29 10:31     ` Шигапов Ринат
  0 siblings, 0 replies; 4+ messages in thread
From: Шигапов Ринат @ 2009-07-29 10:31 UTC (permalink / raw)
  To: ALT Linux Community general discussions

Здравствуйте!

Без проблем монтирую smb-шары линуксовых клиентов в FreeNX-сервер на 
базе OpenVZ. Вот так работает smbclient:
#>>>>>>
smbclient -U srk -p $NXSAMBA_PORT //127.0.0.1/srk
Password:
Domain=[ADMIN] OS=[Unix] Server=[Samba 3.0.33]
smb: \>
#<<<<<

Возникла заминка с Windows-клиентами. smbclient работает по-другому:
#>>>>>
[test@nxServer ~]$ smbclient -U test -p $NXSAMBA_PORT //127.0.0.1/Mydocs
session request to 127.0.0.1 failed (Called name not present)
Receiving SMB: Server stopped responding
session request to 127 failed (Call returned zero bytes (EOF))
Password:
Domain=[NEVOD-E59377A71] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
smb: \>
#<<<<<<
С указанием NetBIOS имени вообще всё гладко:
#>>>>>
[test@nxServer ~]$ smbclient -U test -p $NXSAMBA_PORT -I 127.0.0.1 
//NEVOD-E59377A71/Mydocs
Password:
Domain=[NEVOD-E59377A71] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
smb: \>
#<<<<<<

Однако smbnetfs не работает. Кто-нибудь монтировал шары Windows через 
smbnetfs + проброс 445 порта?

Точка монтирования smbnetfs ~/MyShares/Mydocs:
#>>>>>>
[test@nxServer ~]$ ls -l ~/MyShares/Mydocs/test:test@127.0.0.1
ls: невозможно открыть каталог 
/home/test/MyShares/Mydocs/test:test@127.0.0.1: Недопустимый аргумент
[test@nxServer ~]$ ls -l ~/MyShares/Mydocs/test:test@127.0.0.1/Mydocs
ls: невозможно открыть каталог 
/home/test/MyShares/Mydocs/test:test@127.0.0.1/Mydocs: Недопустимый аргумент
#<<<<<<<

В stderr smbnetfs:
#>>>>>>>
[test@nxServer ~]$ smbnetfs -f -d ~/MyShares/Mydocs/
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56
INIT: 7.9
flags=0x0000003b
max_readahead=0x00020000
   INIT: 7.8
   flags=0x00000000
   max_readahead=0x00020000
   max_write=0x00020000
   unique: 1, error: 0 (Победа), outsize: 40
unique: 2, opcode: LOOKUP (1), nodeid: 1, insize: 60
LOOKUP /test:test@127.0.0.1
   NODEID: 2
   unique: 2, error: 0 (Победа), outsize: 136
unique: 3, opcode: GETXATTR (22), nodeid: 2, insize: 72
   unique: 3, error: -38 (Функция не реализована), outsize: 16
unique: 4, opcode: OPENDIR (27), nodeid: 2, insize: 48
read_socket_with_timeout: timeout read. read error = Соединение 
разорвано другой стороной.
Receiving SMB: Server stopped responding
   unique: 4, error: -22 (Недопустимый аргумент), outsize: 16
unique: 5, opcode: LOOKUP (1), nodeid: 1, insize: 60
LOOKUP /test:test@127.0.0.1
   NODEID: 2
   unique: 5, error: 0 (Победа), outsize: 136
unique: 6, opcode: LOOKUP (1), nodeid: 2, insize: 47
LOOKUP /test:test@127.0.0.1/Mydocs
   NODEID: 3
   unique: 6, error: 0 (Победа), outsize: 136
unique: 7, opcode: OPENDIR (27), nodeid: 3, insize: 48
read_socket_with_timeout: timeout read. read error = Соединение 
разорвано другой стороной.
Receiving SMB: Server stopped responding
   unique: 7, error: -22 (Недопустимый аргумент), outsize: 16

#<<<<<<<

Что-то связанное с NetBIOS?

-- 
С уважением,
        Шигапов Ринат
        инженер-программист ООО "Невод"
        тел. (342)2196960
        JabberID: dxist эт ya.ru 
				



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-29 10:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-22  9:37 [Comm] OpenVZ & smbnetfs & FreeNX Шигапов Ринат
2009-07-22 10:42 ` Boris Savelev
2009-07-24  9:58   ` Шигапов Ринат
2009-07-29 10:31     ` Шигапов Ринат

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

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


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