LINUX.ORG.RU
ФорумAdmin

samba отказывается сотрудничать!


0

0

Самба не хочет принимать сообщения!

Вначале мудрил, потом, для теста добавил дефолтовую строчку в Глоб:
message command = /bin/csh -c 'xedit %s; rm %s' &

Результат не заставил себя ждать, т.к. отрицательный, но и не порадовал.

Кто может сказать, где еще глянуть?
В ту сторону - доходит без трабла, но задача, к сожалению, в обратном =(

Подскажите плиз, что еще могет быть?
Уже все доки перечитал до боли в глазах.

Оттуда шлют и "net send" и прямо попапой, но ...
★★★★★

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

При чем тут конь?

Привожу фрагмент:
@home:$ man smb.conf
... Тра-ля-ля ---
message command (G)
This  specifies  what  command to run when the server receives a
WinPopup style message.

This would normally be a command that would deliver the  message
somehow. How this is to be done is up to your imagination.

An example is:

message command = csh -c 'xedit %s;rm %s' &

This  delivers  the  message using xedit, then removes it after-
wards. NOTE THAT IT IS VERY IMPORTANT THAT THIS  COMMAND  RETURN
IMMEDIATELY. That's why I have the '&' on the end. If it doesn't
return immediately then your PCs may freeze  when  sending  mes-
sages (they should recover after 30 seconds, hopefully).

All  messages  are delivered as the global guest user.  The com-
mand takes the standard substitutions, although  %u  won't  work
(%U may be better in this case).

Apart  from  the  standard  substitutions,  some additional ones

o %s = the filename containing the message.

o %t = the destination that the message was  sent  to  (probably the server name).

o %f = who the message is from.

You  could  make  this  command  send mail, or whatever else takes your
fancy. Please let us know of any really interesting ideas you have.


Here's a way of sending the messages as mail to root:


message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s

If you don't have a message command then the message won't be delivered and Samba will tell the sender there was an error.  Unfortunately  WfWg totally  ignores  the error code and carries on regardless, saying that the message was delivered.

If you want to silently delete it then try:

message command = rm %s

Default: no message command
Example: message command = csh -c 'xedit %s; rm %s' &
... Дальше снова тра-ля-ля ...

Так-что не будем обижать лошадок =)

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

Джентельмены, ниужели никто не юзает такого? Или траблов таких ни у кого нет?

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

То-то и оно, что да!!!

Дал команду ручками!

/bin/csh -c 'xedit %s; rm %s'

Запустился Х-едит! =*(

Ну, как такое могет быть?!
Этож бред!!! ПОЛНЫЙ!


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

Буду ОЧЕНЬ благодарен любым идеям, т.к. крыша едет, вроде все проверил, а не работает, хотя, согласно документации - должно!

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

1. Предположение отпотолочное: а на какой дисплей должен выводить xedit?

2. Если не помогло - почитай журналы. Если ничего нет - попробуй перенаправить stderr в /tmp/куда-то - и почитай там.

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

Похоже, что что-то с правями!

Порыл с дебагом, нашел следующее:

1)
kolyan@home:~$ ps -axuw | grep mbd
root    1985  ??  Is   13:28     0:00,00 /usr/local/sbin/smbd -D
root    1987  ??  Ss   13:28     0:00,01 /usr/local/sbin/nmbd -D

2)
message command = /bin/csh -c `xedit %s`
(Ничего не случается (export DISPLAY=:0.0 пробовал), убрал 'rm %s', чтоб файл не трогала!!!

3) Права на запуск у любого!
kolyan@home:~$ ls -al `which xedit`
-rwxr-xr-x  1 root  wheel  456876 21:21 kolyan@home:~$ ls -al `which xedit`
-rwxr-xr-x  1 root  wheel  456876 21:21 /usr/X11R6/bin/xedit
/usr/X11R6/bin/xedit


3) А вот тут похоже не просто собачка порылась, а цельный КОБЕЛЬ!
kolyan@home:~$ ls -la /tmp/msg.W4FafR 
-rw-------  1 nobody  wheel  5 10 ??? 13:28 /tmp/msg.W4FafR

Она работает, как юзер NOBODY/WHEEL

Вероятно, что не хватает правей, чтоб кидать енто мне на консоль (в данном случае в ИКСЫ)!!!

У кого есть идеи где лучше что подправить?

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

Нарыл таки!
Вот!

tail -f /var/log/XFree86.0.log
AUDIT: Wed Mar 10 16:36:52 2004: 167 XFree86: client 14 rejected from local host

В общем упорство восторжествовало!

Пошел читать =)

Если кто знает, напишити плиз, кто енто такое и нахрена ругается (если вдруг не найду) =)
Да, и если найду будет полезно, вдруг будет другое решение =)

Всем спасибо, может эта ветка кому поможет, т.к. фишка полезная, а судя по первому-же ответу - никто не юзает и не дочитал до ентого места ману =)

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

1. message command = /bin/sh -c 'cat >/tmp/winpopup-messages ; chmod a+r /tmp/winpopup-messages'
2. запускаем в своей сессии такое(простой вариант. Лучше было бы с multicаst-сокетом, но это ты сам пиши):
#!/usr/bin/python
import time
import os
try: 
  f=file('/tmp/winpopup-messages')
  f.seek(0,2)
except IOError:
  while True:
    try: 
      f=file('/tmp/winpopup-messages')
      break
    except IOError: time.sleep(1)
while True:
  line=f.read()
  if line:
    os.popen('xmessage "%s"'%line)
  time.sleep(1)

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