Hi Peter;
At 09:28 PM 11/23/01 GMT, Pete wrote:
On Nov 23, 14:44, Carlos Murillo wrote:
#ls
ls: not found
#vi
vi: not found
I'm no AIX expert, and I've not used it in years. I think
3.2 uses shared
libraries, and vi probably needs something in a library that's not mounted
(or not in the right place) when running the limited maintenance shell.
I'm surprised ls doesn't work, though.
So far, the $program: not found error seems to indicate actual
non-existence of the file... when the file exists but something
else goes awry, either "killed" or "cannot execute" shows up..
The shell should support ls, dd,
backup, restore, chown, mkfs, mknod, mount, and things
like that. And of
course, our editor of choice: ed.
> #cat /etc/mnttab
Have a look in /etc/filesystems and see what it thinks
it should mount for
"mount all". I think AIX actually deletes /etc/mnttab as part of the
normal startup, and does a "touch /etc/mnttab" to leave an empty file.
see below
> #getrootfs
> usage: /usr/sbin/getrootfs [-f] diskname
> -f disregard status of hd5
> Available disks: location:
> hdisk0 00-01-00-00
>
> #getrootfs -f hdisk0
> Importing Volume Group...
> rootvg
> /dev/rhd4 (/): ** Unmounted cleanly - Check supressed
> /dev/rhd2 (/usr): ** Unmounted cleanly - Check supressed
> /usr/sbin/getrootfs: mount: not found
> checking all mounts and the existance of df
> /usr/sbin/getrootfs: mount: not found
> /usr is not mounted
It seems that the original / and /usr were located at
/dev/hd4 and /dev/hd2, since I was able to mount them
later on...
# passwd
cannot execute
Probably the executable isn't in your PATH.
No, apparently when the file isn't found the msg is ": not found" .
I tried all sane locations for the passwd program. "cannot execute"
means something else, perhaps a permissions or restricted shell issue.
If you have the filesystems
mounted (BTW, why "mymnt" not just "mnt"? That's what mnt is for)
you can
add the relevant directories
PATH=/mymnt/hd2/bin:$PATH
I did something similar; I copied all stuff in the ram-based /usr
to another ram-based /usr1 and added /usr1/bin, /usr1/sbin and so
on to the path, the idea being that after I used getrootfs I would not
lose the previously available tools (while getrootfs seemed to change
the actual anchoring of / from the ram to the HD device, it failed to
properly mount /usr; however, the earlier ram-based tree at /usr became
unavailable after the execution of getrootfs, leaving out the "mount" program,
even though the mounting of /dev/hd2 at /usr had failed)
but it might be better (if you just have two partitions
on the hard drive)
to mount hd2 directly on /mnt, and then mount hd4 on /mnt/usr. At least
then things will be in the correct places relative to each other. There
isn't a directory called "/root", is there?
Yes, I did not keep relative mounting closeness in my arrangement.
I'll have to check about the existence of /root (I'm away
from the machine now)
You could try the "users" command, though I
expect it only works on a
normal system (ie not from the maintenacne shell, which is sort of a mini
system, like the miniroot or standalone shell in IRIX and Solaris). If you
can edit /etc/passwd with ed, you can probably remove the password field
from root's entry, leaving a null field (no password).
No ed so far;
typing
# cat /mymnt/hd4/etc/passwd
> reveals that AIX seems to have shadow passwords but I can't find any
> of the usual files (master* etc) .
Possibly in /etc/security/passwd, /etc/security/group,
and so on. Don't
believe AIX is UNIX. It's not.
Indeed.
/mymnt/hd4/etc/security/passwd and opasswd exist, but they
are in a totally unknown format--anything like unix.
Coud I replace a known encrypted (that is, under another unix
variant) password in the corresponding token?
carlos.
--------------------------------------------------------------
Carlos E. Murillo-Sanchez carlos_murillo(a)nospammers.ieee.org