1834796 Members
2617 Online
110070 Solutions
New Discussion

su: not found

 
SOLVED
Go to solution
Fredrik Hansson
Occasional Advisor

su: not found

Dennis handly helped me with a question in this thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=516784&admit=-682735245+1175760354014+28353475
since I wasn't the creator of that thread I wasn't able to give him any points for that. I therefore created this thread only to be able to give him the points he deserves.
Maybe someone can be helped by this thread anyway.




Fredrik Hansson Apr 4, 2007 11:06:39 GMT Unassigned

I'm new on UNIX and I've got the same problem. I also get "not found" in my rc.log file.
This is a part of the script file that generates the not-found messages. my script file (sorry about the swedish...):

...
if [ -x $STARTSCRIPT ]; then
echo "Fredrik testar ls -lrt"
ls -lrt
echo "Fredrik testar ll"
ll
echo "Fredrik testar ls"
ls
su - sas -c "$STARTSCRIPT start"
set_return
echo $NAME "started."
else

... script continues...

This is what comes out in my rc.log


...

Start SAS Metadata Server
Output from "/sbin/rc3.d/S700sas_metadataserver start":
----------------------------
Fredrik testar ls -lrt
total 5548
-r--r--r-- 1 bin bin 965 Nov 14 2000 .profile
drwxr-xr-x 2 root root 96 Aug 28 2006 lost+found
dr-xr-xr-x 23 bin bin 8192 Aug 28 2006 usr
<-- I 've cut some rows here 2 save space -->
drwx------ 2 root root 96 Apr 4 12:10 .ssh
dr-xr-xr-x 16 bin bin 8192 Apr 4 12:12 dev
drwxrwxrwx 9 bin bin 8192 Apr 4 12:13 tmp

Fredrik testar ll
/sbin/rc3.d/S700sas_metadataserver[50]: ll: not found

Fredrik testar ls
.ICEauthority
.TTauthority
.Xauthority
.dt
<-- I 've cut some rows here 2 save space -->
tmp_mnt
usr
var

/sbin/rc3.d/S700sas_metadataserver[53]: su: not found

ERROR CODE 127
SAS Metadata Server started.
"/sbin/rc3.d/S700sas_metadataserver start" FAILED

... rc.log continues...

1. Is my problem also junk in the /etc/rc.config.d/ directory?
2. How can I figure out what file(s) that aren't supposed to be there?
3. How can strange files in that folder affect the execution of my scripts?
4. How can ls -lrt work an not ll?

I have attached the startupscript and the rc.log file. I think the neccessary information is pasted in this post though.



-----------------------------------------------
Dennis Handly Apr 4, 2007 11:20:33 GMT Unassigned

>Fredrik: I'm new on UNIX

Since you can't award points, you should start your own thread.

Basically your problem is that in a RC script, your path is probably set to /usr/sbin/.
That has ls(1) but not ll(1). You would have to use ls -l. Or if you know that /usr/bin is mounted, you can add that to the path.

>1. Is my problem also junk in the /etc/rc.config.d/ directory?

Yes, never do that.

>2. How can I figure out what file(s) that aren't supposed to be there?

Look what you changed.

>3. How can strange files in that folder affect the execution of my scripts?

Because that's the way it works. ALL files are sourced.

>4. How can ls -lrt work an not ll?

See comments about about /usr/sbin.

----------------------------------------------
Fredrik Hansson Apr 4, 2007 13:20:10 GMT Unassigned

Thank you Mr. Handly!

You were right about the path thing. When I added the path you suggested it worked.



2 REPLIES 2
Dennis Handly
Acclaimed Contributor
Solution

Re: su: not found

This was a follow up question to:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=516784

(If someone wants to see the attachment.)
Fredrik Hansson
Occasional Advisor

Re: su: not found

Problem solved. See posts above.