1833780 Members
2748 Online
110063 Solutions
New Discussion

Re: SAM problem

 
SOLVED
Go to solution
Andre Lemon
Regular Advisor

SAM problem

# sam
sh: sam: Execute permission denied.

Hello everyone, I get the above error message
when I try to use SAM and some other messages that I am sure are from the same problem:

# history
sh: fc: Cannot access or open the history file.

here is a listing of /etc/PATH

# more PATH
/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/nettladm/bin:/opt/fc/bin:/opt/fcms/b
in:/opt/upgrade/bin:/opt/pd/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/hparray/b
in:/opt/cobol/bin:/opt/perf/bin:/opt/OV/bin/OpC:/opt/ignite/bin:/opt/resmon/bin:
/opt/pred/bin:/opt/hpnpl//bin:/opt/hpnp//bin
14 REPLIES 14
Mel Burslan
Honored Contributor

Re: SAM problem

# type sam
sam is /usr/sbin/sam
# ll /usr/sbin/sam
-r-xr-xr-x 1 bin bin 7032 Nov 20 2001 /usr/sbin/sam
do you see execute permissions like this one I put above ??

make sure you have the rights to run sam, i.e., you are not a regular user and all regular user rights to sam being turned off.


for the history file, it looks like somebody have changed the ownership of your history file. Are you root ot equivalent when you are gtting these messages ?

________________________________
UNIX because I majored in cryptology...
saju_2
Respected Contributor

Re: SAM problem

Hi

It seems that the execute permission on /usr/sbin/sam is not there .

first chcek ll /usr/sbin/sam .

But make sure u r looged in as a user who has the permsiion to execute this command .
Check the file permssion for .sh_history also.

Regards
CS
Andre Lemon
Regular Advisor

Re: SAM problem

I am on as root, I think that this is more than a problem with accessing SAM, I think that something in the PATH may be the problem.



Andre'
Deepak.R
Frequent Advisor

Re: SAM problem

Normally, you need to have superuser privilege to run SAM,

root can also configure sam with limited menu items for any user by using restricted sam builder (run sam -r as root ) .

Its not a path issue as you are getting error "execute permission denied" very clearly.

for history issue, try removing and recreating user with same UIS ( do not use userdel without -r option not to delete home directory )

thanks
deepak

Fabio Ettore
Honored Contributor
Solution

Re: SAM problem

Hi Andre',

I would guess it is a problem about PATH variable, infact I don't understand why /usr/sbin is missing in the PATH of your system.

export PATH=$PATH:/usr/sbin
sam

Does it work?

Best regards,
Fabio
WISH? IMPROVEMENT!
Andre Lemon
Regular Advisor

Re: SAM problem

That did correct the problem with SAM, however other commands are not working, such as the "esc k". I notice that the current directory that I am in is not being displayed
at the prompt how do I get that back? I am not sure what has caused these little problems.
V. Nyga
Honored Contributor

Re: SAM problem

Hi,

maybe your home directory was moved or the path isn't right in the passwd.

You have to check where are your .profile, .cshrc, and others.

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
Fabio Ettore
Honored Contributor

Re: SAM problem

I think your $HOME/.profile was not read on login. Infact (apart the PATH problem) PS1 (the current directory on prompt) usually is defined there.
How did you login as root on the system (telnet, su - root, CDE, or ....what)?

Best regards,
Fabio
WISH? IMPROVEMENT!
Andre Lemon
Regular Advisor

Re: SAM problem

Fabio i am logged into the system directly using a logon called "alsoroot", this is a backup up log for root due to the fact that my Operator was prompted to change the root password while I was away and could not remember what he changed it to and it has since expired. I cannot reactivate the root logon since I cannot put in the old one first. But anyway.... I am using this one for
now. When I look in the /etc/home I do not even see any files for the "root" user, I get the following for "alsoroot" (I see that
there are a total of 6 files, so are the 3 for "root" hidden?)

# ll *root*
total 6
-rw-r--r-- 1 root root 347 Aug 10 2000 .exrc
-rw-r--r-- 1 root root 593 Aug 10 2000 .profile
-rw-r--r-- 1 root root 734 Aug 10 2000 .proflie
Gavin Clarke
Trusted Contributor

Re: SAM problem

On the subject of your root account you may wish to look at this thread, then you might not have to solve your original problem.

If I remember correctly last time I had this problem I was able to correct it without a reboot to single user mode

http://forums2.itrc.hp.com/service/forums/questionanswer.do?threadId=267217&admit=-1335382922+1121351499796+28353475
Gavin Clarke
Trusted Contributor

Re: SAM problem

esc k (vi options) is set in the user's profile.

Perhaps you could copy .profile from root's home directory to alsoroot's home directory?
V. Nyga
Honored Contributor

Re: SAM problem

Hi,

what does 'll -a' says?

Also:
'alsoroot' should be owner of the files in it's home directory.
Try to change it or make a copy to become owner.
Also - which group is 'alsoroot'?

V.
*** Say 'Thanks' with Kudos ***
Andre Lemon
Regular Advisor

Re: SAM problem

I fixed everything by doing a restore from a backup prior to yesterday. Not sure what happened but the problem has been corrected.


Thanks for your suggestions and efforts as always.


Andre'
Andre Lemon
Regular Advisor

Re: SAM problem

I did a restore.