hscroot@hmcserver:~> grep root /etc/group
hscroot@hmcserver:~> ls -la /etc/shadow
-r-------- 1 root shadow 5252 2015-05-06 19:36 /etc/shadow
hscroot@hmcserver:~> cat /etc/shadow
cat: /etc/shadow: Permission denied
hscroot@hmcserver:~> grep hscroot /etc/passwd
hscroot:x:500:500:HMC Super User:/home/hscroot:/bin/hmcbash
hscroot@hmcserver:~> echo $DISPLAY
hscroot@hmcserver:~> su -
bash: su: command not found
hscroot@hmcserver:~> sudo su -
bash: sudo: command not found
hscroot@hmcserver:~> bash
bash: bash: command not found
hscroot@hmcserver:~> chs
bash: chs: command not found
hscroot@hmcserver:~> ksh
bash: ksh: command not found
hscroot@hmcserver:~> ls /bin/bash
hscroot@hmcserver:~> /bin/bash
bash: /bin/bash: restricted: cannot specify `/' in command names
hscroot@hmcserver:~> exit
Connection to closed.
[user@notebook ~]$ ssh hscroot@ /bin/bash
/bin/bash: /bin/bash: restricted: cannot specify `/' in command names
[user@notebook ~]$ 

Question: How can I cat the "/etc/shadow"? I only have "hscroot" user.

I have X forward if I use "ssh -X".

  • I may be wrong but I thought HMC was the systems management application for AIX. Is it OS neutral?
    – Bratchley
    May 6, 2015 at 17:55
  • umm, yes and maybe yes. May 6, 2015 at 17:59
  • Are you trying to recover the password on the HMC? I may have misunderstood the question at first.
    – Bratchley
    May 6, 2015 at 18:04
  • I want to cat the /etc/shadow file. :\ May 6, 2015 at 18:05
  • 4
    The point of file permissions is that you can't unless you have appropriate privileges. You don't so you can't.
    – Sobrique
    May 6, 2015 at 18:07

4 Answers 4


You submit a support call to IBM who then give you the hscpe user password, which is good for one day. That user ID and password allows you to gain access to root (assuming you recorded the root password when you installed the HMC). Then you can cat /etc/shadow.

You can't do it without root access (by design), and you can't simply switch to root either (also by design) on an HMC.


A HMC is a blackbox solution from IBM. You aren't supposed to have root access. It is possible to request a tempoary password from IBM that provide root access.


As a comment says, you don't cat /etc/shadow unless you already have root permissions. That's how the system is designed - that's how UNIX and Linux system have been designed since at least the 1990's if not before (pre-1992 is before my time, so I can't speak with authority).

  • 1
    In the dawn of time the password was in /etc/passwd, which was (and still is) world-readable. Hence the name, of course. Back then it seemed that the one-way encryption algorithm (use the password as the key to encrypt a constant string) was strong enough that there was no danger of brute-forcing. Eventually this was no longer a reasonable assumption, and since /etc/passwd is used to look up user names, the password was moved to a new unreadable location.
    – alexis
    May 6, 2015 at 22:23

with hscroot you can do a:

chhmcusr -u root -t passwd

and thus you will now know (change) the root password, log in with root, cat the /etc/shadow. Then if needed, restore the old shadow file from backup, so the root pw will be unchanged, but you will still have a root terminal to cat.

But I didn't tested this yet. Usually "PermitRootLogin no" is in the sshd_config..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.