-bash: sendmail: command not found

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat -bash: sendmail: command not found
# 8  
Old 03-21-2017
when I cd to the path /usr/sbin/ I have got the below

sendmail -> /etc/alternatives/mta
# 9  
Old 03-21-2017
Hi,

That's fine, don't worry about any of that. In your script, instead of just putting sendmail, put /usr/sbin/sendmail instead, and see if it works.
# 10  
Old 03-21-2017
when I cd to the path /usr/sbin/ I got

sendmail -> /etc/alternatives/mta is this a file??

---------- Post updated at 10:26 AM ---------- Previous update was at 10:25 AM ----------

Quote:
Originally Posted by drysdalk
Hi,

That's fine, don't worry about any of that. In your script, instead of just putting sendmail, put /usr/sbin/sendmail instead, and see if it works.
Oh okay I will try again
# 11  
Old 03-21-2017
Hi,

It's a symbolic link - not a file itself, but a pointer to somewhere else. Entirely normal, and the way that Red Hat do things as part of their alternatives system.

Now, please just try typing /usr/sbin/sendmail in your command or script or whatever it is you're doing. You should find it works, where typing sendmail on its own doesn't. This is because /usr/sbin (the directory in which this link lives) is not in your path, as you saw previously.
# 12  
Old 03-21-2017
Quote:
Originally Posted by Devipriya Ch
when I cd to the path /usr/sbin/ I got

sendmail -> /etc/alternatives/mta is this a file??

---------- Post updated at 10:26 AM ---------- Previous update was at 10:25 AM ----------



Oh okay I will try again

I tried now.

Code:
[hyperion@vdcalq04108 /]$ usr/sbin/sendmail -s "test" devipriya.challa@ge.com
WARNING: RunAsUser for MSP ignored, check group ids (egid=10, want=51)
can not chdir(/var/spool/clientmqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.
[hyperion@vdcalq04108 /]$



Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 03-21-2017 at 12:52 PM.. Reason: Added CODE tags.
# 13  
Old 03-21-2017
Hi,

I'm starting to get the feeling there's some very unusual things about the way your system is set up. Is it a full, complete and otherwise normal install of Red Hat Enterprise Linux 6 or one of its derivatives (e.g. CentOS, Scientific Linux, etc) ? If this has been installed in a non-standard way or otherwise customised heavily, or if you're running in a chroot'd environment or some other kind of cut-down system, it would be handy to know that.

In any case, this error points to a potential permissions problem with the Sendmail binary itself, which shouldn't really happen in a normal out-of-the-box Red Hat system. Could you let us know what you get as the output of ls -l /usr/sbin/sendmail.sendmail, please ?
# 14  
Old 03-21-2017
server is Liniux RHEL 6.5 version. this is new server which I am trying to send email. And I am running this with a functional ID.

I tried the command which you suggested got

Code:
[hyperion@vdcalq04108 mail]$ ls -l /usr/sbin/sendmail.sendmail
-rwxr-sr-x. 1 root smmsp 833512 Jun 17  2010 /usr/sbin/sendmail.sendmail


Moderator's Comments:
Mod Comment Seriously: Please use CODE tags as required by forum rules!

Last edited by RudiC; 03-21-2017 at 12:53 PM.. Reason: Added CODE tags.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command not found, but using function in bash

In the bash below, if the answer is "y" then goto function remove. If the answer is "n" then goto the id variable line (where the date is inputted). However, I am getting command remove not found, but remove is a function not an command. I must have the syntax incorrect? Thank you :). ... (3 Replies)
Discussion started by: cmccabe
3 Replies

2. Shell Programming and Scripting

Bash Script giving "Command Not found"

Hello Geeks, Greetings...I have the following script: #!/usr/bin/bash #Script to generate number of active PDP context & calculate PDP activation #failurefrom EPG-M #Script written by Gbenga Adigun #September 12, 2013 username="xxxxxx" password="xxxxxxxxx" HOSTS=( ggsn01... (6 Replies)
Discussion started by: infinitydon
6 Replies

3. Shell Programming and Scripting

bash: <command nm> command not found

I created a script that I need to run from time to time, but get this error message. To get it working again I run this command from time to time: export PATH="$PATH:~/scripts" I put all my automated scripts in the /scripts directory and would like to run my scripts from any directory... (5 Replies)
Discussion started by: catalinawinemxr
5 Replies

4. Shell Programming and Scripting

bash:vi:command not found

I downloaded and installed "Cygwin yesterday onto my PC running Windows XP. When I tried to type "vi" in Cygwin's window, I got the following message bash: vi: Command not found What shud i do inorder to get into vi editor Thanks (10 Replies)
Discussion started by: bobby1015
10 Replies

5. Red Hat

BASH command not found strang behavior

Hi all I am relatively new to linux (specifically red hat). I have installed Fedora 13 on my machine and started playing with the terminal when i found a very strange behavior when typing a command that is not found: the terminal does not prompt me back. In other words, i am logged as root (or... (4 Replies)
Discussion started by: abohmeed
4 Replies

6. Shell Programming and Scripting

rm:command not found in linux Bash shell script

Hi All, Linux lxs3er06 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686 i386 GNU/Linux Issue: While executing shell scripts in bash shell, following error messages are thrown: rm:command not found On doing little investigation, I added '/bin' to $PATH and on doing echo... (9 Replies)
Discussion started by: a1_win
9 Replies

7. Post Here to Contact Site Administrators and Moderators

What's happens with my thread about "-bash: ELF: command not found "?

Hi, Today, I've submitted a new tread in "Shell Programming and Scripting" forum, with title "-bash: ELF: command not found ". However, this thread has disappear. Can somebody give me an explanation? Regards. (3 Replies)
Discussion started by: Sonia_
3 Replies

8. Shell Programming and Scripting

bash syntax error: command not found

I am trying to create a shell that asks the user to enter their name, and compare it to my own by saying we have the same name or saying my name and that they have a nice name too. Here is my script... #!/bin/bash-x echo "Enter your name". read name if then echo "My name is Adam too"... (1 Reply)
Discussion started by: amaxey45
1 Replies

9. Shell Programming and Scripting

#!/bin/bash and #1bin/sh command not found error on mac osx terminal/shell script

i am having a weird error on mac os x running some shell scripts. i am a complete newbie at this and this question concerns 2 scripts. one of which a friend of mine wrote (videochecker.sh) a couple weeks ago and it's been running fine on another machine. then last week i wrote capture.sh and it... (2 Replies)
Discussion started by: danpaluska
2 Replies

10. UNIX for Dummies Questions & Answers

bash: cron-config: command not found - PLEASE HELP ME!!

Hello All, I have installed Cygwin on Windows XP and working with some Shell scripting work, I have needed to schedule my script using the cornetab and whatever commands such as "cron", "cron-config" are not working in my cygwin shell, I re-installed the Cygwin but the same problem is with... (2 Replies)
Discussion started by: sriya
2 Replies
Login or Register to Ask a Question