Apache on Linux - how to get remote user login - linux

Few days ago I was asking about getting $_SERVER['REMOTE_USER'] as apache.
After few hours I have found a module for apache which allows me to get $_SERVER['PHP_AUTH_USER'] variable which is similiar to $_SERVER['REMOTE_USER'] on windows IIS service.
Now I have to move my apps from windows/xampp server to linux (probably some kind of debian distro - don't know it yet).
And my questions is:
Is it possible to get remote username on linux? (users are login into domain, site works only on local intranet with no internet access)
Does this module also works on linux-apache or it is only for windows?
Is there any similiar module which allows me to get aforementioned variable?

For anyone looking for an answer there is mod_auth_gssapi which can be used for remote authentication with Windows.It also supplies the mentioned REMOTE_USER variable. You can find a link to the Github repo here:
Github

Related

Log in to Github via Fedora Server 37

I am using Mac OS as my main operating system. I installed fedora 37 server edition in a VMware workstation as part of my course in college. I am trying to customize my prompt using this repo https://github.com/andresgongora/synth-shell.
I have installed git already. I also have power line-fonts installed. The issue I am having comes with this command: git clone --recursive https://github.com/andresgongora/synth-shell.git
When typed and executed I get a prompt asking me for a GitHub username and password. I enter my credentials and I get an error stating "Authentication Failed for https://github.com/andresgongora/synth-shell.git" even though my credentials are correct.
I have tried putting my username and password (both combinations separately) and I get an event error. I configured a global username and that doesn't work either.
Am I supposed to log in to my GitHub before cloning this repo? Does anyone else experience this or have a workaround?
I have tried putting my username and password (both combinations separately) and I get an event error. I configured a global git username and that doesn't work either.
Sites used:
Can't clone a github repo on Linux via HTTPS
https://docs.github.com/en/get-started/getting-started-with-git/setting-your-username-in-git
https://documentation.red-gate.com/soco/troubleshooting/authentication-failed-when-cloning-from-github
Edit: I have also tried setting up a token to log in with. The only issue I am having is my linux distro does not support copy and paste so I am having to type everything out. When the password prompt comes up everything is blank to hide your password so I can't even check for spelling errors.
As of mid 2021, github the company is now enforcing git HTTPS authentication to use an access token rather than username+password. See this stackoverflow answer for full information.
One way forward is to generate an SSH key, and upload the public portion to github.
It warrants mentioning that this change is specific to Github Inc., the Microsoft subsidiary. There have not been any changes to git, the distributed version control system. Other, similar repository hosting services may not necessarily bar you from authenticating via username+password. Gitlab is one example.
I managed to fix my issue by using cockpit in my web browser. Doing this allowed my to copy and paste my information and everything worked first try.
Beginner problem.

Authenticating Windows Domain users with Rstudio-server

this is my first time using Linux, and I'm shooting in the dark here.
I'm using Ubuntu 14.04 LTS and the latest version of Rstudio Server.
After much trial and error I finally managed to join my company's local domain, which enables network users to log into the Linux machine.
I have no problems logging into the Rstudio Server using a local account, but I can't log in using a network user account.
I've been on many help pages (below) but they haven't been much help:
Password Database for RStudio Server?
NIS/AD Authentication with RStudio Server
Deploying Rstudio Server for Classrooms
RStudio Server - Log-in and User Authentication Problems
Accesing RStudio using domain credentials
Any help or directions would be greatly appreciated.
I know it has been a while, but I just stumbled upon your question.
Probably it not relevant any more, nevertheless, I will briefly contribute.
Since you are a first time Linux user, I assume that you didn't make the investment of buying into the RStudio Server Professional Edition.
Active Directory user login is not available for the Open Source Edition. Only local users are allowed with the Open Source Edition.

IIS 6 & Web Deploy 3.5 - ERROR_USER_NOT_ADMIN

I've been trying to use Web Deploy 3.5 to deploy an application to an IIS 6 web server without any luck.
I am connecting using a domain service account that is an administrator of the remote server, but when I attempt to deploy (or validate the connection in VS2012) I receive a "ERROR_USER_NOT_ADMIN" error instead.
I read that Web Deploy 2.0 had a bug in it where a domain user account could not be used, but surely that's fixed by now? Right?
Has anyone had any luck with IIS 6.0, Web Deploy 3.5 and domain user accounts?
Anyone else trying this (with the right password ;-) , there is an issue using non domain accounts that gives this message, and the link in the error wasn't much use for me....
There is a regedit (yes, I know it's dirty, but this was a dev machine), which gets this working.... I'd tried everything from the MS link with adding users to additional groups etc, but still didn't work, the solution below did though.
Take a look at http://networkprogramming.wordpress.com/2010/10/29/401-not-authorized-for-msdeploy%E2%80%8F-msdeployagentservice/
Well this is embarrassing. It looks like that error message is also returned if the password is incorrect.
Oh well, you live and learn!
Another possibility: The user's password has expired.
Either
go into the "local users" within computer management and make sure Password never expires is checked, OR
run this command for that user: WMIC USERACCOUNT WHERE "Name='YOUR-USERNAME-HERE'" SET PasswordExpires=FALSE

Configuring Request Tracker 4.0 with Apache2 on Linux Mint 14 Nadia

My coworker installed Linux Mint 14 Nadia onto a VM (using VirtualBox) and followed the following tutorial to install Apache, MySQL and PHP: http://community.linuxmint.com/tutorial/view/486. He then used the readme from http://www.bestpractical.com/rt/docs/4.0/ to install Request Tracker 4.0. Both of those went pretty well with very few hiccups along the way from what he told me. Now he's forwarded over the task to me and I'm attempting to get Request Tracker 4.0 configured correctly with the Apache server. Currently I can visit localhost and get the following message:
It works! This is the default web page for this server. The web server
software is running but no content has been added, yet.
I also configured it so when you visit localhost/rt you SHOULD see the Request Tracker interface, but I'm instead receiving the following page, and this is where I've spent most of my time stumped:
You're almost there! You haven't yet configured your webserver to run
RT. You appear to have installed RT's web interface correctly, but
haven't yet configured your web server to "run" the RT server which
powers the web interface. The next step is to edit your webserver's
configuration file to instruct it to use RT's mod_perl or FastCGI
handler. If you need commercial support, please contact us at
sales#bestpractical.com.
After a few moments it redirects me to bestpractical.com/rt/rt-broken-install.html. (only allowed 2 links apparently?)
I assume I have something misconfigured but am unsure what. I've been googling and fiddling around with this most of yesterday and today with no luck. It doesn't help that I'm fairly inexperienced with the linux environment, I'm sure.
If I understand how he installed it, he wants to set it up using FastCGI so I visited this site requesttracker.wikia.com/wiki/FastCGI and followed the guides there, but the documentation is quite awful and doesn't always line up with my environment, so I've had to put in a lot of guess and check work. I'll provide the code I've added to my config files so you see where I'm at for now
000-default in /etc/apache2/sites-enabled:
Alias /rt /opt/rt4/share/html
Alias /NoAuth/images /var/www/rt/share/html/NoAuth/images/
AddHandler fastcgi-script fcgi
ScriptAlias / /var/www/rt/sbin/rt-server.fcgi/
<Directory /opt/rt4/share/html/>
Order allow,deny
Allow from all
</Directory>
RT_SiteConfig.pm in /opt/rt4/etc:
Set($WebPath, '/rt');
Set($WebBaseURL, 'http://localhost');
If anymore information is needed, please let me know. Thanks in advance for any help!
The RT docs for web deployment give more detailed info for setting up Apache with fastcgi and for running at '/rt'. I think you'll want to initially try using the suggested Apache configurations and see if that gets you past the setup page.
(Note that those docs are available in the RT install as well in the docs directory.)

Setting up a local SVN repository with encrypted passwords with TortoiseSVN

I am planning on using a local repository, using only TortoiseSVN's "create repository here" feature.
The repo is created and I can read and write to it just fine. The problem is that I can't get authentication to work. I thought I wanted Windows authentication, but I actually want the simple text-file based authentication so I can force the current system user (i.e. any person can be using the same Windows account and I want to differentiate between them) to provide their name and password. I haven't found any information on how to do this without svnserve running.
So far, I have modified svnserve.conf like this:
anon-access = read
auth-access = write
password-db = passwd
realm = LocalOnly
I didn't mess with the [sasl] section.
I also modified passwd:
[users]
harry = teH0wLIpW0gyQ
I am trying to use encrypted passwords created with a simple perl script. However, regardless of what I do with the repo (i.e. including writing to the repo), I am never prompted for a password.
I tried clearing TortoiseSVN's authentication cache since I do connect to a remote repo, but this didn't matter at all.
Has anyone tried this and succeeded? Or is it not possible without svnserve?
Not possible without svnserve - it takes care of the challenge/response.
Try Subversion Edge. you can edit the file you are mentioning using the GUI provided by the tool. It uses its own http server(not svnserve or IIS).
Unfortunately your best bet with a local repository is to use your file system permissions. A simple and free option for a server (that's easy to manager) would be VisualSVN Server. You can hang it off or a workstation or drop it on a public webserver somewhere. I now have mine setup with a reverse proxy with IIS7 so it's integrated with the rest of my web site.

Resources