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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@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@bilby rpmstrap-0.5.2]$ cat /tmp/test
#!/bin/sh
echo fred
fred

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

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

--

Cheers
John

-- spambait
1aaaaaaa@xxxxxxxxxxxxxxxxxxxxxxx  Z1aaaaaaa@xxxxxxxxxxxxxxxxxxxxxxx
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/

do not reply off-list


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux