r/tryhackme • • May 29 '22

How to login as root in tryhackme machine?

I get access to the tryhackme machine using the ssh and now i have to access the root file.
The user tryhackme have not permission to read that file and now when i want to switch the user to root using 'su root' it ask for password of root which in not provided in any documentation.
now how do i get access to the root file?

0 Upvotes

13 comments sorted by

7

u/[deleted] May 29 '22

If you want help, provide context.

  • What machine/room?

6

u/JAKKKKAJ May 29 '22

That's pretty much one of the major subjects of hacking a box: How do I get access on the system as root? There are too many ways to get there to describe them in a short comment.

-1

u/BadMoles May 29 '22

find / -perm -u=s -type f 2>/dev/null then take the file names and look them up at gtfobins.GitHub.io

1

u/Particular_Complex66 May 29 '22

don't understood
not found any solution

4

u/SunDevilThor May 29 '22

Lol, the guy with the best answer here to a question with no context… getting downvoted the most.

0

u/BadMoles May 29 '22

Yeah, go figure.

1

u/[deleted] May 29 '22

this is only one of many possible solutions

-4

u/BadMoles May 29 '22

No shit, Sherlock.

2

u/[deleted] May 29 '22

relax

0

u/[deleted] May 29 '22

[deleted]

1

u/Particular_Complex66 May 29 '22 edited May 29 '22

https://tryhackme.com/room/linuxfundamentalspart3

I am at this room and i cann't find a way to access the apache2/access.log file

This is my problem:

tryhackme@linux3:/var/log/apache2$ cat access.log
cat: access.log: Permission denied
tryhackme@linux3:/var/log/apache2$ sudo cat access.log 
[sudo] password for tryhackme: 
tryhackme is not in the sudoers file.  This incident will be reported. 
tryhackme@linux3:/var/log/apache2$

3

u/confused_pupper May 29 '22

You're trying to read the wrong file. Take a look around in that directory