Wednesday, May 6, 2009

samba problem after migration from debian etch to lenny: NT_STATUS_OBJECT_NAME_NOT_FOUND

Samba moslty makes problems to me after updates which are hard to solve.

Last night I upgraded our company filesserver from debian entch to lenny. After a short test with my linux client and on my windows terminalserver, it seemed to work correctly. Well, this was quiet different the next morning.

Problem
The next day after the upgrade from debian etch to lenny, some guys were able to use all shares of the fileservers, others were not (those were a little angry).

Find cause
To debug the problem, add following two lines to your /etc/samba/smb.conf

log level = 3
log file = /tmp/samba.log

Now watch the logfile while you access the the share. This is my log:


[2009/05/06 18:34:50, 3] smbd/process.c:process_smb(1549)
 Transaction 328 of length 128 (0 toread)
[2009/05/06 18:34:50, 3] smbd/process.c:switch_message(1361)
 switch message SMBtrans2 (pid 13791) conn 0×96ff070
[2009/05/06 18:34:50, 3] smbd/trans2.c:call_trans2qfilepathinfo(3939)
 call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 1004
[2009/05/06 18:34:50, 3] smbd/trans2.c:call_trans2qfilepathinfo(3993)
 call_trans2qfilepathinfo: SMB_VFS_STAT of shell32.dll failed (No such file or directory)
[2009/05/06 18:34:50, 3] smbd/error.c:reply_unix_error(154)
 unix_error_packet: error string = No such file or directory
[2009/05/06 18:34:50, 3] smbd/error.c:error_packet_set(61)
 error packet at smbd/trans2.c(3994) cmd=50 (SMBtrans2) NT_STATUS_OBJECT_NAME_NOT_FOUND

== To solve ==

Now, Mr. Google said following after I searched for NT_STATUS_OBJECT_NAME_NOT_FOUND:
http://lists-archives.org/samba/30781-error-when-upgrading-to-samba-3-0-25b-nt_status_object_path_not_found.html

Well, in the last message of the thread, following can be read:
> A reboot in the Windows PCs was the solution.

Quit strange cause just one of the angry users didn’t shut down the pc over night. So I rebooted first my linux machine. Then all windows users had to reboot and some of them also had to manually delete all saved networkdrives (like k:) and restart the logon-script. The problem was vanished.

Not to forget

If the samba server was upgraded, always REBOOT the windows machines and manually DELETE and RECREATE the specific networkdrives.

Posted by schmidi2 at 17:49:15 | Permalink | Comments (1) »

Saturday, November 1, 2008

LimeSurvey - Language cannot be changed (unchangeable)

If you want to change the language in LimeSurvey but nothing happens, you have to set the following configuration parameter (in config.php):

$translationmode = 1;

This strange “workaround” is required when your php installation has some bug (don’t ask me).

Much time has cost me to find this solution.

Source:
http://www.limesurvey.org/index.php/de/Deutsches-Forum/20128-ReGerman-eingestellt-aber-alles-noch-in-Englisch.html
http://docs.limesurvey.org/tiki-index.php?page=Installationsanleitung

Posted by schmidi2 at 21:13:09 | Permalink | No Comments »

Thursday, September 18, 2008

Simple autologin per SSH

To allow login per SSH without entering the password, execute with the asked user following commands (one line) on the client-machine:
(replace <REMOTESERVER> with the ip/hostname of your remote server)

cat ~/.ssh/id_rsa.pub | ssh root@<REMOTESERVER> ‘mkdir ~/.ssh/ 2>/dev/null ; cat >> ~/.ssh/authorized_keys ; cat ~/.ssh/authorized_keys | uniq > ~/.ssh/authorized_keys.tmp ; mv ~/.ssh/authorized_keys.tmp ~/.ssh/authorized_keys’

If you get the error File “~/.ssh/id_rsa.pub” not found cancel with CTRL+C, execute command ssh-keygen and just hit enter to response questions. After that, call the first command again.

Posted by schmidi2 at 13:49:36 | Permalink | No Comments »

Tuesday, July 29, 2008

The VMware VmPerl Scripting API was not installed

Error

# vmware-config.pl
The VMware VmPerl Scripting API was not installed.  Errors encountered during
compilation and installation of the module can be found here:
/tmp/vmware-config0

You will not be able to use the “vmware-cmd” program.

Errors can be found in the log file:
‘/tmp/vmware-config0/control-only/make.log’

Solution
# apt-get update
# apt-get install libssl-dev

Following packages are now new installed on the system:
libc6-dev libssl-dev linux-kernel-headers zlib1g-dev

# vmware-config.pl

After vmware is now properly configured, you can savely remove those packages again (but - let it be).

Source
http://www.linuxquestions.org/questions/linux-software-2/vmware-server-install-error-the-vmware-vmperl-scripting-api-was-not-installed.-476129/

Posted by schmidi2 at 14:24:36 | Permalink | No Comments »

Monday, July 28, 2008

phpmyadmin: timeout occours when creating a backup of a mysql database

If PhpMyAdmin throws a timeout exception when you would want to make a mysql-dump (in GIBB, dump is called “dömp”), it’s somewhat depressing. But there is a solution called MySqlDumper:

www.mysqldumper.de/en/

Unfortunately a typo3 extension doesn’t exists yet.

Posted by schmidi2 at 12:52:59 | Permalink | No Comments »

Wednesday, July 23, 2008

Bash for-loop should ignore space-characters

If you wanna to someting like this:

 

for I in $(zgrep -H “from=<test@google.com>” /var/logs/*.gz 2>/dev/null)
do
  LOG_FILE=”`echo $I | cut -d ‘:’ -f 1`”
  DATETIME=”`echo $I | cut -d ‘:’ -f 2-4 | cut -d ‘ ‘ -f 1-3`”
  MAILID=”`echo $I | cut -d ‘:’ -f 5 | cut -d ‘ ‘ -f 2`”
  RECIPIENT_ADDR=”`zgrep $MAILID $LOG_FILE | grep ‘to=’ | cut -d ‘<’ -f 2 | cut -d ‘>’ -f 1`”
  echo “$DATETIME $RECIPIENT_ADDR”
done

You will notice sooner or later that this doesn’t work this way: The for-loop doesn’t only treat line-breaks as a new element but also space-characters. Well, how can that be solved, fast and easy. This way:

 

zgrep -H “from=<test@google.com>” /var/logs/*.gz 2>/dev/null | while read I
do
  LOG_FILE=”`echo $I | cut -d ‘:’ -f 1`”
  DATETIME=”`echo $I | cut -d ‘:’ -f 2-4 | cut -d ‘ ‘ -f 1-3`”
  MAILID=”`echo $I | cut -d ‘:’ -f 5 | cut -d ‘ ‘ -f 2`”
  RECIPIENT_ADDR=”`zgrep $MAILID $LOG_FILE | grep ‘to=’ | cut -d ‘<’ -f 2 | cut -d ‘>’ -f 1`”
  echo “$DATETIME $RECIPIENT_ADDR”
done

Posted by schmidi2 at 16:31:59 | Permalink | No Comments »

Tuesday, July 15, 2008

Webminstats error: disk.pl 140 : bad output for blocs : procbususb

Error

From: root@javatux.tup.local. (Cron Daemon)
To: root@javatux.tup.local.
Subject: Cron <root@javatux> /etc/webmin/sysstats/sysstats.pl
Content-Type: text/plain; charset=UTF-8
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
Date: Tue, 15 Jul 2008 15:07:02 +0200
Message-Id: <1216127222.585803.27235.nullmailer@javatux.tup.local.>

WARNING (eval)(disk.pl 140) : bad output for blocs : procbususb 0 0 0 - /proc/bus/usb
WARNING (eval)(disk.pl 195) : bad output for inodes : procbususb 0 0 0 - /proc/bus/usb

Solution

Open webmin, goto webminstats and open the module “Disk”. Then click on the link “configure module”. Scroll down until you see the list with all watched filesystems. Deactivate the list-entry “/proc/bus/usb” or simply delete it.

Posted by schmidi2 at 14:13:59 | Permalink | No Comments »

Monday, July 14, 2008

VMware: does not contain the file “linux/version.h” as expected

Error:


The path “/usr/src/linux/include” is a kernel header file directory, but it 

does not contain the file “linux/version.h” as expected. This can happen if 
the kernel has never been built, or if you have invoked the “make mrproper” 
command in your kernel directory. In any case, you may want to rebuild your 
kernel.

What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include] 

Solution

Check if you have installed these packages (your kernel version may be different).

linux-headers-2.6-686
linux-headers-2.6.18-6
linux-headers-2.6.18-6-686
linux-image-2.6-686
linux-image-2.6.18-6-686
linux-kbuild-2.6.18
linux-kernel-headers

Following link must also exist:

ll /usr/src/

lrwxrwxrwx 1 root src 27 2008-07-14 13:16 linux -> linux-headers-2.6.18-6-686/
drwxr-xr-x 17 root root 4096 2008-07-14 13:12 linux-headers-2.6.18-6
drwxr-xr-x 4 root root 4096 2008-07-14 13:15 linux-headers-2.6.18-6-686
drwxr-xr-x 3 root root 4096 2007-06-04 21:03 linux-kbuild-2.6.18
drwxrwsrwx 5 root src 4096 2007-06-04 21:09 vmware-server

Posted by schmidi2 at 16:26:05 | Permalink | No Comments »

Thursday, July 10, 2008

Webminstats error: sh: -S: invalid option in /etc/webmin/sysstats/sysstats.pl

After upgrading the webmin module “Webminstats” the cron-job started to send every three minutes an eMail like this one:

From: root@ (Cron Daemon)
To: root@
Subject: Cron /etc/webmin/sysstats/sysstats.pl
Content-Type: text/plain; charset=ANSI_X3.4-1968
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:
Date: Thu, 10 Jul 2008 13:24:02 +0200
Message-Id: <1215689042.170398.14108.nullmailer@>
X-MailCleaner-Information: Please contact server@t-p.com for more information
X-MailCleaner: Found to be clean
X-MailCleaner-SpamCheck: not spam, SpamAssassin (cached, score=-4.399,
required 5, ALL_TRUSTED -1.80, BAYES_00 -2.60)
X-CTCH-RefID: str=0001.0A0B0201.4875F164.0098,ss=1,fgs=0
X-cff-SpamScore: 0(/)
X-cff-SpamReport: —– —– Message is unknown to the spam scanner.
X-cff-LastScanner: av

sh: -S: invalid option
Usage: sh [GNU long option] [option] …
sh [GNU long option] [option] script-file …
GNU long options:
–debug
–debugger
–dump-po-strings
–dump-strings
–help
–init-file
–login
–noediting
–noprofile
–norc
–posix
–protected
–rcfile
–restricted
–verbose
–version
–wordexp
Shell options:
-irsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option

 

Solution

The problem was only solved after I disabled the cronjob, then deleted the module (first make backup of /etc/webmin/sysstats/modules/ !!). After I reinstalled the same version of Webminstats and copy back the backup, the error didn’t appear again (of corse you have to open the webminstats-page at least once for scanning an to reactivate the cronjob).

It seams that is problem started after I made an update of webmin and webminstats. But on other machines I did the same update without receiving errors.

 

Posted by schmidi2 at 12:42:39 | Permalink | No Comments »

Saturday, May 17, 2008

Opera: libjvm.so, libawt.so cannot be preloaded: ignored, libjava.so: No such file or directory

When you start Opera over a console and get following errors, it means that you haven’t configured the Java plugin into opera:

ERROR: ld.so: object ‘libjvm.so’ from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object ‘libawt.so’ from LD_PRELOAD cannot be preloaded: ignored.
opera: libjava.so: cannot open shared object file: No such file or directory

If you wish to use Java in Opera, you have to install first the JRE, the Java Runtime Environment. In a Debian/Ubuntu system, just install the package “sun-java6-jre” (maybe you have to enable the “non-free” and “contrib” apt-get sources first).

Next configure Opera:
 Select the menu “Tools” -> “Preferences…”
 Goto Tab “Advanced” and select “Content”
 Activate checkbox “Enable Java”
 Klick on button “Java options…”. You can now select the path to Java JRE

In my case the Java Path was “/usr/lib/jvm/java-6-sun/jre/lib/i386″

Restart ist required and now Java should work in Opera.

Posted by schmidi2 at 18:11:32 | Permalink | No Comments »