Please help: "sh: 1944: command not found"

John Summerfied debian at herakles.homelinux.org
Wed Apr 5 23:05:45 UTC 2006


Hongwei Li wrote:
> Hi,
> 
> I have a very strange problem and need help. My system:
> 
> os:             2.6.15-1.1833_FC4
> selinux:        targeted-1.27.1-2.22, targeted-sources-1.27.1-2.22 sendmail:  
>     8.13.4-2
> squirrelmail:   1.4.6-3.fc4
> httpd:          2.0.54-10.3
> spamassassin:   3.0.4-2.fc4
> clamav:         0.88-1.fc4
> mysql:          4.1.16-1.FC4.1
> php:            5.0.4-10.5
> dovecot:        0.99.14-4.fc4
> 
> I installed vacation-1.2.6.1.tar.gz and it works well.  All users can login to
> secure shell and run vacation to setup auto-reply. Then, I installed
> squirrelmail plugins, all required and the plugin for vacation:
> vacation_local-2.0-1.4.  After doing config and setup, a strange thing
> happens.  Most of my users can run vacation_local in squirrelmail well -- they
> can enable or disable auto-reply, they can edit the auto-reply subject and
> message as they wish -- almost perfect.  However, there is one user who can
> run shell vacation command and it works, but he cannot run vacation_local in
> his squirrelmail account.  When he runs, the screen shows "Settings Saved"
> with no error, but actually nothing happens in his home directory -- no
> .forward, no .vacation.msg, no .forward.subj etc. created in his home
> directory as other users get.  When I check the system log, I found that when
> this user click the Option -- Vacation Message in squirrelmail, the system's
> http error log shows 6 lines of:
> 
> sh: 1944: command not found
> 
> when other users do the same thing, no error message at all.  Then, I did the
> following tests.
> 
> 1. remove sm plugin vacation_local, remove shell package vacation, then
> reinstall them from scratch.  The situation remains the same: this user (let's
> call user1) can run shell vacation command, but not sm plugin's vacation_local
> (the same error log);  other users can run both shell vacation command and sm
> plugin vacation_local.
> 
> 2. delete user1 account, remove/clean all user1's files (emails, home
> directory, sm pref settings, cron job etc.), reboot, then add a new account
> still called user1.  This account is basically "empty" -- no email, no any
> files in his home directory, he still cannot run sm plugin vacation_local
> (creating the same error message), but can run shell command vacation.
> 
> 3. create several new accounts, as long as not called user1, but any other
> account name, the user can run both shell vacation and sm plugin's
> vacation_local.
> 
> 4. create a new account, do not call user1, but something else, say user2. 
> Then, copy all of user1's files and settings (emails, sm pref files etc.) to
> user2 and change the ownership to user2.  Then, test user2 -- user2 can run
> both shell command vacation and sm plugin vacation_local without any problem.
> 
> I cannot understand it at all. Can somebody help me:
> 
> 1. What does the error message "sh: 1944: command not found" mean?
> 

I was thinking that either the command "1944" was not found, or that it 
happens on line 1944 of some script.

My testing doesn't produce quite the same results though, but it could 
depend on the version of sh you have.
Here are my results with

[summer at bilby rpmstrap-0.5.2]$ sh --version
GNU bash, version 3.00.15(1)-release (i686-dingo-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.

My test script:
[summer at bilby rpmstrap-0.5.2]$ cat /tmp/test
#!/bin/sh
echo fred
fred

[summer at bilby rpmstrap-0.5.2]$
My tests and results, including mistakes.
[summer at bilby rpmstrap-0.5.2]$ vim /tmp/test
[summer at bilby rpmstrap-0.5.2]$ chmod +x /tmp/test
[summer at bilby rpmstrap-0.5.2]$ /tmp/test
fred
/tmp/test: line 3: fred: command not found
[summer at bilby rpmstrap-0.5.2]$ sh /tmp/test
fred
/tmp/test: line 3: fred: command not found
[summer at bilby rpmstrap-0.5.2]$ sh .  /tmp/test
.: .: is a directory
[summer at bilby rpmstrap-0.5.2]$ sh -c .\  /tmp/test
/tmp/test: line 0: .: filename argument required
.: usage: . filename [arguments]
[summer at bilby rpmstrap-0.5.2]$ sh -c .\ /tmp/test
fred
/tmp/test: line 3: fred: command not found
[summer at bilby rpmstrap-0.5.2]$ sh --version

You could also try google, with and without the number.

-- 

Cheers
John

-- spambait
1aaaaaaa at computerdatasafe.com.au  Z1aaaaaaa at computerdatasafe.com.au
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/

do not reply off-list




More information about the fedora-list mailing list