1

Under my user home directory I have a file called passwords.txt which is owned by a another user. I don't have sudo access.

Permission of the passwords.txt file is r-x------ spual spaul

How can I read this text file?

3 Answers 3

6

You ask the system administrator or the user spaul to give you permission.

10
  • 1
    I'd ask the system administrator or spaul just what in the devil spaul's passwords.txt file is doing in someone else's home directory. Commented Sep 23, 2018 at 16:50
  • You might have better luck asking the owner of the home directory, who in many setups will generally be the only (unprivileged) person with write permission. (-: Commented Sep 23, 2018 at 19:19
  • @JdeBP it seems that the OP is the owner of the home directory, but the file in it is not accessible to them. Commented Sep 23, 2018 at 19:43
  • I did ask the sys admin but he told me there is a way to solve it. "An easy puzzle to solve". @JdeBP- the file is on my home directory. Commented Sep 23, 2018 at 21:55
  • Write permission on the directory roaima. Commented Sep 23, 2018 at 22:59
0

If the hard drive or the home folder is not encrypted you have two options:

  1. Access the file via a live system (if you are allowed to boot).
  2. Plug the hard drive to another computer you have root/sudo rights and access the file.

If not, refer to @roaima's answer.

-3

This worked:

sudo –u spaul /bin/cat passwords.txt
3
  • 3
    If this worked, your question gives wrong details, namely "I don't have sudo access." Commented Sep 26, 2018 at 13:59
  • still i dont have sudo access on the machine, create a similar environment and try it. Commented Sep 26, 2018 at 20:35
  • You're not making sense I'm afraid. You say you don't have sudo access but your working solution uses sudo. Huh? Commented Sep 26, 2018 at 21:36

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.