The following C program can check the password of a user on Linux. But it does not work on macOS because some functions are Linux specific. Could anybody show me how to revise the program so that it works on macOS? Answer Both Linux and macOS use PAM for authentication; Linux uses Linux-PAM, and MacOS and BSDs OpenPAM. To authenticate
Tag: authentication
can’t change postgres 10.4 user password on AWS ec2
I want to add password protection to my psql db that I have set up on an Amazon Linux ec2 server. I only want the database to be accessible through the server instance(I am connecting to server via putty), and only with password authentication. Previously, my pg_hba.conf (located at /var/lib/pgsql/data/) looked like this (USER: all, METHOD: trust): To secure it,
Can I use ssh to login another host and automatically “su” to another user? [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
Login script using Python and SQLite
I’m trying to create a login script using SQLite to store the user data. Any ideas on how to to that? I have research over hours and found nothing of the kind. I would appreciate any help! 🙂 This is what I got so far: But it always returns Login failed… I want to check the input “user” and the
Writing Bash Script to Log Out if Incorrect upon Login. Need guidance
I am trying to write a Bash Script that will log the user out if they cannot get the security question. I am needing to find either an array or multiple if conditions to reflect this. I know there are a lot of sub-stuff such as stopping any override input(CTRL+Z, etc). Below is the script I have so far, and
Coding of Admin-Guest login section in an OS
I developed an authentication algorithm for user authentication as part of my masters thesis and implemented it in PHP. I intend to know how can I implement the algorithm for operating system login, in which language (for linux)? also where the code will reside because it will not be click and run code it will automatically load upon the starting
Disabling Auto root login on a Debian-based distro? [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
How to execute a command on behalf of a user if login is denied
I need to run tomcat on behalf of tomcat user. But in /etc/passwd I have the following line: So when I try to do this: sudo su tomcat ./bin/startup.sh It complains about: su: /bin/nologin: No such file or directory How do I execute the command with proper permissions? Thanks in advance! P.S. I’m trying to reverse engineer the configuration and
Authenticate linux based user in java
I have a username and password for a particular user in Linux i need to verify that if the user is valid or not using java? Abdul Khaliq Answer The Java way to do this would be JAAS, but you’ll still need a LoginModule that works with Linux. Here’s a beta implementation that claims to work.