Operating System - HP-UX
1753882 Members
7479 Online
108809 Solutions
New Discussion юеВ

start sendmail from /sbin/init.d

 
SOLVED
Go to solution
Victor_5
Trusted Contributor

start sendmail from /sbin/init.d

when I run
/sbin/init.d/sendmail start
it said that
start... user unknown

However, I can start sendmail from
/sbin/rc2.d/S540sendmail start

I know it is only a link, why the first case can not work?
What is the meaning of "user unknown"?
11 REPLIES 11
Uday_S_Ankolekar
Honored Contributor

Re: start sendmail from /sbin/init.d

Hi,

/sbin/init.d/sendmail start and stopshwould woork.

What's the size and permissions of the sendmail file in /sbin/init.d

Should be
-r-xr-xr-x 1 bin bin 3607 Feb 24 1999 sendmail

One of my server has this.

-USA..

Good Luck..
Sridhar Bhaskarla
Honored Contributor
Solution

Re: start sendmail from /sbin/init.d

Victor,

Try to rename the script /sbin/init.d/sendmail as /sbin/init.d/rc.sendmail and run the command

/sbin/init.d/rc.sendmail start

It may be because the script itself is having the name of a command "sendmail" which is contrary to the shell script naming convention.

It will work through the link as the link is having a different name. If you don't want to get this message, keep the name as rc.sendmail and change your links in /sbin/rc* .

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Victor_5
Trusted Contributor

Re: start sendmail from /sbin/init.d

Same with you, the only difference is permission, mine is 550 intead of 555, but I don't think it is a problem since I log in as root, any other ideas?
Uday_S_Ankolekar
Honored Contributor

Re: start sendmail from /sbin/init.d

Hi,

You should be having one more sendmail file in /usr/sbin. You are getting "usr unknown" actually from this file.

and ione in /usr/lib/sendmail should have link to /usr/sbin.

--USA..
Good Luck..
Uday_S_Ankolekar
Honored Contributor

Re: start sendmail from /sbin/init.d

Hi,

One more thing you can try apart from Sri's suggetion is get /sbin/init.d/sendmail file from other server with same Version of OS.

-USA..
Good Luck..
Victor_5
Trusted Contributor

Re: start sendmail from /sbin/init.d

Hi Sridhar:

It works! But I did not get your point, what is the reason, can you give me more detais? Thanks! The point in coming.
pap
Respected Contributor

Re: start sendmail from /sbin/init.d

HI,
Check the user and group for this file.
Try to set the owner and group as root:sys then see if it executes?

Thanks,

-pap

"Winners don't do different things , they do things differently"
Sridhar Bhaskarla
Honored Contributor

Re: start sendmail from /sbin/init.d

Victor,

Depending on how you issue the sendmail command and your path it is picking up the original sendmail daemon from /usr/sbin and running it as start as the destination user.

To make it sure, we renamed the script.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Victor_5
Trusted Contributor

Re: start sendmail from /sbin/init.d

Thanks all!

The problem is I was sitting in /sbin/init.d, when I run sendmail, it run /usr/sbin/sendmail instead of /sbin/init.d/sendmail as I thought.

Changing name or copying from other servers both can work, they are good idea, thanks again.

Have a great weekend, all!