What is the path to the htb-students mail?

Linux Fundamentals - System Information

1.What is the path to the htb-students mail?

2.Which shell is specified for the htb-student user?

I have looked for about an hour and can’t find the answers for both of them.

1 Like

@Keato said:

Linux Fundamentals - System Information

1.What is the path to the htb-students mail?

2.Which shell is specified for the htb-student user?

I have looked for about an hour and can’t find the answers for both of them.

Start with cat /etc/passwd

Thsi gives you the shell for the htb-student account and tells you the path where the mailbox lives.

You can validate the path with ls to confirm there is a htb-student folder there.

1 Like

Hi @Keato ,

1.What is the path to the htb-students mail?

$ env | grep MAIL
MAIL=/var/spool/mail/$USER

2.Which shell is specified for the htb-student user?

$ env | grep SHELL
SHELL=/bin/bash

12 Likes

Spoiler Removed

@CyberNand Thanks for your answer! I was flooding my keyboard with tears until I tried those commands.

@CyberNand Thanks!!

@hackerhokage said:

please help me i’m stuck with the same i tried /var/spool/mail but there are only dot files.

Did you try this?

guys can you help me on this?, i started with this basic course, and trying to get to answer the question “What is the path to the htb-students mail?”

getting the answer is completely not explained in the course, and is way over my noobskill level yet.

is this whole site way clumsy with over the top questions like this one? because then it is a waste of time. I fly throught the learning texts, and the first questions i understand, and then this NASA brainsurgeryskilled apes in space level question!.. hmmzz

going to try with a fresh mind tomorrow again. :smiley:

curious what you all think of this…

cheerz!

3 Likes

@Protaxian said:

guys can you help me on this?, i started with this basic course, and trying to get to answer the question “What is the path to the htb-students mail?”

getting the answer is completely not explained in the course, and is way over my noobskill level yet.

is this whole site way clumsy with over the top questions like this one? because then it is a waste of time. I fly throught the learning texts, and the first questions i understand, and then this NASA brainsurgeryskilled apes in space level question!.. hmmzz

going to try with a fresh mind tomorrow again. :smiley:

curious what you all think of this…

cheerz!

Did you look at this?

i was a bit stupid muppet… haha. i forget i wasnt SSH’ed anymore. So it’s sleep time for me now…

Still thanks for the link though. tomorrow i try again with some fresh brains!

use env command

3 Likes

If you, like me, were pulling your hair out on this one and ultimately concluded to google search this answer - know that you’ll find it a post below this one.

HOWEVER if you are also dissatisfied with being spoon-fed the answer and wondering just how in the qbert you’d find the answer on your own - I would encourage you to take a look at the Linux commands presented on the same page as this question and actually try them all out. Use them and see what happens. It isn’t enough to just read their description and move on.

Do that, see if you can derive the answer, and then come back and check this forum if you can’t.

3 Likes

Made an account just to point out how frustrating a comment this is. People are here to learn, teach them. Don’t expect them to go find the answer themselves, then why did they bother to come to you? You can make people for an answer, even tell them to look in certain places. People are busy and seek guidance so as to not waste time and repeat the mistakes of others, so come down off your high horse. Comment as useless as @TazWake who links to the same page, wow thanks a hat. Thank you to Moheeb and CyberNand for trying. As a note for some, they want the answer as the generic htb-student and not the specific one you are using htb-ac584810.

3 Likes

@Ashaman_Cooper if this environment frustrates you, you can always go elsewhere. I get that you are frustrated but surely there are better things to do with your time than rant here.

The link I posted goes to a post that tells people how to get the answers. What part of it didn’t you like?

Are you suggesting we should just post the answers for everyone? I mean, that is an option but it pretty much defeats the purpose of this site.

2 Likes

check the environment ( env ) its going to be a little bit down…no grep using yet

1 Like

Ok - I am not sure what i am missing

I grep the env command and i get a path that points to the mailbox - but when i actually try to go to that directory, there is a directory for ‘root’ user but not the htb-student

Screenshot 2024-02-25 at 1.15.34 AM

1 Like

cat /etc/passwd gives the correct path i.e. /var/mail/htb-student. What is confusing is that there is also a mail folder in /var/spool/mail/$NAME as the text in the training suggests. This is the wrong path.

Sorry for the necro but I would just like to say that I’m enjoying the course thus far. However, this question was unnecessarily convoluted. We shouldn’t need to post to forums in order to find answers to questions about material we were just taught.

I’m no noob when it comes to Linux. I even tried echo “Test mail” | mail -s “Test Subject” htb-student
to try and trace where a test message would be stored but was blocked when I tried to install mailutil as root.

Anybody taking these courses have already shown their motivation to learn. I agree with a previous poster that this one was a little bit to far ahead as far as knowledge goes. You can’t go from just learning what ls and a directory are to this. It’s pretty jarring.

1 Like

I agree with the other students here that say these questions are far too advanced for this fundamental course on Linux commands. Fundamental should be super easy. There were no adequate explanations for these various commands and what they do. Someone said use the cat command, but there wasn’t any explanation what this command does. No clue as to why it should be used to find the mail directory. I had to look elsewhere for a definition of ‘concatenate’ … basically it means to combine separate words into one word, but that doesn’t help in the slightest to understand how that would help find the path to the htb-student’s mail. The question doesn’t really make sense. Find the mail? Mail what? The mail folder? The mail file? I’m assuming by mail it means email?

Anyway, is there a lesson or module that explains these commands? This doesn’t seem like a fundamental prerequisite SOC course when it assumes you have knowledge of these other commands.

Where should I go to learn the real fundamentals of the fundamental Linux commands?

TIA

If the env command shows a path that points to the mailbox but you can’t find the directory for the htb-student user