Solved

AIX permission denied on almost every command as root

Posted on 2008-06-24
10
3,651 Views
Last Modified: 2013-11-17
when trying to run almost any command I get execute permission denied on AIX 4.3 (I think it's 4.3 at least)

I cannot run:
ls
df
chown
vi
nor can I create a file with a redirect ie. echo test > test.txt
The list goes on and on...

I can run:
cat
echo
cd
grep
ps
maybe some more
0
Comment
Question by:mikelfritz
  • 5
  • 4
10 Comments
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 100 total points
ID: 21860429
What error do you get?

What is the output of

echo $PATH

0
 
LVL 4

Accepted Solution

by:
robertfwoods earned 400 total points
ID: 21861512
Either your .profile or environment configuration file has been removed.
Thus your PATH variable is unset (as tintin correctly identified).

If echo $PATH returns blank or some other garbage, try following:

PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin
export PATH

then echo $PATH to see if it looks like the above string.

Then post output of following
env
ls -al /.profile
ls -al /etc/profile
ls -al /etc/environment
oslevel
oslevel -r

If the /etc/environment file is missing or contains 0 bytes, you might try placing one line in it and then logout and back in.

The line should read:
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin
Permissions on the /etc/environment file should be 664 owned by root:system.

If that solves the immediate problem, then you will need to recreate the environment file that should have been present. We can help but your system administrator should be the final authority on any changes.

Do NOT tamper with this file if there are other configuration lines present. You may cause your users to become dysfunctional.
0
 
LVL 14

Author Comment

by:mikelfritz
ID: 21861546
on ls command (and most others)
0403-006 execute permission denied.  

on echo test > test.txt
There is an input or output error.
ksh: test.txt: 0403-005 Cannot create the specified file.

Fails as well if I run as /bin/sh so it's not limited to ksh


echo $PATH
/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin  (That matches a working machine)


0
 
LVL 14

Author Comment

by:mikelfritz
ID: 21861576
Robert,

The PATH is there.

Execute permission denied on all of those commands.

/etc/environment is there and has sane content.  I don't know how to see the permissions on the file without  ls working.  I ran chmod on it with no difference in behavior.  I'm not really sure if chmod is working, but it does not complain.

/.profile is in place and looks sane as well.
0
 
LVL 4

Expert Comment

by:robertfwoods
ID: 21861617
It is higly probable you machine is suffering some form of disk malady.

Call IBM Support immediately. 1 800-IBM-SERV
Ask for AIX support option 2 then 3
Have serial number at hand.

If you can try /usr/bin/errpt and /usr/bin/errpt -a to be prepared for the call.

0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 4

Expert Comment

by:robertfwoods
ID: 21861642
Try
/usr/bin/df -k

You might have a filesystem at 100%.

If so, you might try following:

/usr/sbin/acct/nulladm /var/adm/wtmp
and
/usr/sbin/acct/nulladm /etc/security/failedlogin
0
 
LVL 4

Expert Comment

by:robertfwoods
ID: 21861646
Those commands will set to null the wtmp and failedlogin files.

Those files track failed login attempts (attacks) on your server and last logins.

0
 
LVL 14

Author Comment

by:mikelfritz
ID: 21861796
I've already tried to do a lot of the things you suggest.

The df command is on the list of things I can't do.  /usr/sbin/acct/nulladm is not there nor is /usr/sbin/acct for that matter.  I think even if it were there it would fail as any time I try any writing to the disk I get "There is an input or output error."

And the icing on the cake - errpt reports Bus error.

Too bad it's 3000 miles away from me.  

0
 
LVL 14

Author Comment

by:mikelfritz
ID: 21861853
Update.

I had them do a hard shutdown and reboot.  I can now access it fine, for now.  They finally told me that this is the third crash in two days, the first person I talked to said it had been up for a long time..  The other two times the server was down with no access even at the console.  

I'm going to yank the data off and get it onto a Linux box for now.  The errpt shows disk errors starting yesterday AM.

Thanks for the help.
0
 
LVL 14

Author Closing Comment

by:mikelfritz
ID: 31470304
Thanks
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now