Score:0

Apache Authentication - Find out user password

aw flag

My field of expertise is far away from server management but I am currently covering for a former collegue of mine, so I apologize in advance if my question doesn't make sense.

I have to restart an Apache server running on Debian. However, I do not have the password for the root user, nor for the user that I am logged in as currently( let's call it user X). I was given the SSL certificates which are now installed on my local machine and I use SuperPutty to connect to the server without username-password credentials. However, everytime I type a command with "sudo", I am prompted to type the password for user X.It might be of relevance to say that user X has Admin permissions.

My question is:

Is there a way to find out the user X password either from the SSL certificates or from the server files? or

Is there a way to find the root user password while I am logged in as user X? or

Is there another way to log in as root user?

I tried:

  • reading the password from the htpasswd file - the file is strongly encripted.
  • changing the password using the htpasswd command - no success.
  • guessing the password - no success.
  • creating a new user - no permissions.
us flag
unless one of the certificates you were give allows you to log in as root. there's no way to to enable `sudo` access other than guessing the user password.
Score:0
ar flag

No.

First of all, you're not looking for an Apache password stored in a .htaccess file. You're looking for the Linux user password. That's stored in /etc/shadow, which you can't even read. And it's salted and stored using a good hashing algorithm.

The certificates does not contain the password. They are merely an alternate way of authenticating via SSH. sudo will however not accept those.

Ask the owner of the system to create an user account for you with a known password that you can change afterwards.

Mariya Mihaylova avatar
aw flag
Thank you so much! This gives me a direction forward.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.