pam ftp send upon successful login - pam

I've researched this feature extensively and need help. PAM is a difficult authentication program for me to thoroughly understand although I'm learning.
We have the option of running either ProFTPD or pure-ftpd on a VPS hosted by hostgator. The OS is CentOS release 5.11. I have complete access to the server. Our goal is to send an email upon successful FTP login by a user. I've successfully used a script which is run by PAM for notification emails dispatched upon successful SSH logins and need to modify it for successful FTP logins. That script which is amazing works fine with ssh (but we need ftp as I've mentioned) and can be viewed here:
http://blog.stalkr.net/2010/11/login-notifications-pamexec-scripting.html
Before I even try to wrap my head around why this script does not work using FTP, despite PAM working on our VPS (for at least ssh), can someone chime in with some theory as to why this is not working at all. I.E., maybe I'm way off base with this idea and it can't work with FTP and PAM in which case I'll just drop this approach. However, when I read configuration settings, etc., on using PAM with these two FTP programs, they seem to indicate this should work.
Additionally, running the following code which is supposed to test for PAM-enabled applications does not return FTP.
ldd /{,usr/}{bin,sbin}/* | grep -B 5 libpam | grep '^/'
Any suggestions or help from gurus would be greatly appreciated.

Found solutions. The answer was to include session_support=YES in the /etc/pam.d/vsftd configuration file. So that's the answer to anyone who may have a similar issue.

Related

Gmailr, authendication problem in one host but not others

gmailr authentication fails, after a fresh installation of Debian, only on one of my systems.
I have a script that run fine on two remote machines, but fails on my local machine.
I use this for authentication:
gm_auth_configure(path = "~/.credentials_main_mail.json")
gm_auth(email = "natsisthanasis#gmail.com",
cache = "~/.secret_main_mail")
print(gm_profile())
On my local machine, I get the error:
Error: Can't get Google credentials.
Are you running gmailr in a non-interactive session? Consider:
* Call `gm_auth()` directly with all necessary specifics.
I have tried interactive with Rstudio and R console, with the same result.
All scripts and credentials are always on sync between machines using unison. And all worked fine as cron jobs, before the new installation.
Does anyone have any idea on how to investigate further the problem or solve it?
I made it to work again, but I don't understand why, as I didn't have to do that on my other systems.
I used an answer from this stackoverflow question.
I used:
rappdirs::user_cache_dir("gargle")
library("gargle")
gargle_oauth_sitrep()
If someone has a short explanation, please enlighten me!

Authentication problems

I am trying to automate the process to create a model with azure machine learning services and I get some problems with the authentication. When I run my code on my remote machine everything is fine but when I run the code on remote I get this authentication sentence:
Make sure your code doesn't require 'az login' to have happened before using azureml-SDK, except the case when you are specifying AzureCliAuthentication in azureml-SDK.
Performing interactive authentication. Please follow the instructions on the terminal.
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code CZMKCYS8B to authenticate"
Azure ask me for authentication and I have to make it manually.
I would like to know if there is some way to do it automatically.
I was looking for it and I was investigated how to do it using tokens but I couldn't find any solution
Someone can give me an advice?
Thanks in advance.

Remote access to DOS command line from Unix

I'm looking for a way to develop some Unix scripts that will connect to a DOS box (Windows server 2012) and interactively execute DOS commands.
I'm comfortable with the Unix side (I'll almost certainly use Expect), but I'm "Windows illiterate" and am unable to find anything about connecting to Windows's DOS command line in this fashion. Is this even possible to do?
(FWIW, this is to enable us to control Tableau Server using its 'tabcmd' DOS command suite from our existing Linux environment.)
UPDATE 1:
I think another way of asking the question is: does Windows provide anything that is the equivalent of the Unix "remote shell", accessible from Unix?
There are no built-in tools to do this, although PsExec is a utility that can almost do what you want. PsTools are not a built-in, but are hosted on Technet. Some things to keep in mind:
PsExec works by actually remotely copying a file over to the Windows System32 folder (copying is one thing that is builtin ;)
Windows uses Kerberos for authentication. This depends on the computer you are running the command from being on the same Active Directory as the computer you want to control, with access set up from that side. Linux can use kerberos through third-party AD integration tools (like Quest Authentication Services, a commercial product), or also Centrify but there are no built-in tools that do it.
Psexec is not encrypted, meaning if you send commands containing sensitive data, they can be seen (though not the authentication part of it).
PsExec is obviously still a Windows utility. I have been able to get it to work using Wine, but only for a local account and after some tweaking with matching hostnames and stuff. It's possible that if you have authenticated using QAS or Centrify that your wine command will somehow pick it up, but I haven't tested it; I don't work where we use AD anymore.
Maybe the biggest problem is the difference of philosophy between the two communities. Windows doesn't use command line execution very often for remote administration. There is more focus on using your local utilities on a remote system (i.e., you can load a remote registry hive from RegEdit or browse the file system of a remote system using your local Windows Explorer program).
Overall, I think Keith's solution is actually the best, and the most straightforward.

access denied on cloud control app push git bash for windows

I am trying to push Piwigo CMS(http://piwigo.org/) to Cloudcontrol I tried the method as same as Drupal, which is described in https://www.cloudcontrol.com/dev-center/Guides/PHP/Drupal%207 But I am getting this error
This is indeed, as pst pointed out, a pubkey issue.
You might want to check your ssh config, it helped to define the following in my ~/.ssh/config:
Host cloudcontrolled.com
user USERNAME
IdentityFile ~/PATH_TO_YOUR/rsa_key
I dunno if this works as well in cygwin or similar: it would help if you could specify your environment a little bit more, as there are many elements (read binaries, configs, etc) in play here.

How do you do Cygwin passwordless rlogin or rsh to Solaris 5.7

I am trying to login in to my works Solaris box from cygwin on windows.
SSH is not supported. I have tried different combination in the .rhosts with no luck
I do not have root privileges.
I found the answer. When I put in the password the way it percieved my login was on top of the screen(whic was not what you would expect) . I put that in the .rhosts and it worked.
While you found the answer to your question with rlogin/rsh, my recommendation is to discontinue use of these insecure programs. Both are known to have buffer overflow exploits, and they both send passwords in clear text.
There's really no excuse for not using SSH these days. Tell whoever owns/manages the system to enable it. That's really in their best interest anyway. It comes installed by default on most Unix varieties, and is available from most vendors as a package.
Anyone who is running a Unix/Linux system and doesn't use SSH is just being irresponsible.

Resources