HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to be clever

 
Paul Procter
Frequent Advisor

Trying to be clever

Hi guys,

I think this is a result of me trying to be clever but I am struggling to reset the issue.

I created an additional 'root' type user with UID=0 in /etc/passwd

Additionally I then re-assigned all of the 'root' files i.e.
.ssh
.sh_history
.rnd
.profile

to reside in the /home/xxx/yyy directory.

I have rebooted a couple of the servers taht this change was made on with no impact.

The symptoms are:
I can change to a directory under /tmp and 'cat' files however if I attempt to 'cat' /etc/passwd, /etc/shadow and others the terminal session hangs.

Further to this I have tried to run the 'env' command with the same results.

I believe I am missing something fundamental here but would appreciate any help to resolve the issue if you've seen it before.

TIA
Paul
7 REPLIES

Re: Trying to be clever

>I then re-assigned all of the 'root' files i.e. .ssh ...
>to reside in the /home/xxx/yyy directory.

Copied or moved? If you moved, did you remember to change the home directory of root too?
Paul Procter
Frequent Advisor

Re: Trying to be clever

Hi Dennis,

Yep, changed the /etc/passwd file to reflect the new location.
Paul Procter
Frequent Advisor

Re: Trying to be clever

Further to this I can vipw/view the passwd file.
Paul Procter
Frequent Advisor

Re: Trying to be clever

I can also cat some other files
:o(

Re: Trying to be clever

>to reside in the /home/xxx/yyy directory.

(Any reason this is xxx/yyy instead of just xxxyyy?)

Is this over NFS?
Paul Procter
Frequent Advisor

Re: Trying to be clever

The reason for /home/xxx/yyy was to separate user-ids eg. UNIX, DBA, DEV....etc..

No NFS involved, standard build (apart from being on an integrity VM)
Jose Mosquera
Honored Contributor

Re: Trying to be clever

Hi!

You have selected a risky user type to do tests. :s
Try to ensure to place your cloned user in a line before that 'root' user (/etc/passwd).

Rgds.