Comments (4)
pamtester -v sshd jnchi authenticate
pamtester: invoking pam_start(sshd, jnchi, ...)
pamtester: performing operation - authenticate
Connected
Enter the following code at https://aka.ms/devicelogin : BDNKF8HDY
Please hit enter after you have logged in.
Connected
no upn?
Segmentation fault (core dumped)
See #6 for more info.
from pam_aad.
strace pamtester -v sshd jnchi authenticate
openat(AT_FDCWD, "/home/cyberninjas/Documents/C_aad/pam_aad/src/key.pem", O_RDONLY) = -1 ENOENT (No such file or directory)
- const unsigned char *key = load_file("/home/cyberninjas/Documents/C_aad/pam_aad/src/key.pem");
from pam_aad.
pamtester: invoking pam_start(sshd, jnchi, ...)
pamtester: performing operation - authenticate
Connected
Enter the following code at https://aka.ms/devicelogin : B8TNPJ8LE
Please hit enter after you have logged in.
Connected
parsed
parsed
Connected
Segmentation fault (core dumped)
Function Debug Trace
int poll_microsoft_for_token(char *code, char *resource_id, char *client_id, char *response_buf)
int request_azure_oauth_token(char *code, char *resource_id, char *client_id, char *token_buf)
static int *request_token(char *user_code, const char *resource_id, const char *client_id, const char *token_buf)
request_azure_auth(pam_handle_t *pamh, int echocode, const char *resource_id, const char *client_id, const char *tenant, const char *token_buf)
static int azure_user_in_group(const char *token, const char *required_group_id, const char *tenant)
int request_azure_group_membership(char *token, char *required_group_id, char *tenant)
int parse_user_object_id(char *response_buf, char* user_object_id_buf)
Note: By temporarily disabling required_group_id
, the module no longer segmentation faults:
//if (azure_user_in_group(token_buf, params.required_group_id, params.tenant) == 0){
rc = PAM_SUCCESS;
//}
pamtester -v sshd jnchi authenticate
pamtester: invoking pam_start(sshd, jnchi, ...)
pamtester: performing operation - authenticate
Connected
Enter the following code at https://aka.ms/devicelogin : BT9KQQNPU
Please hit enter after you have logged in.
Connected
parsed
parsed
Password:
pamtester: Authentication failure
PAM Functions
-
pam_sm_authenticate()
-
pam_sm_setcred()
-
pam_sm_acct_mgmt()
(missing)
PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv) {
return PAM_SUCCESS;
}
auth [success=2 default=ok] pam_debug.so auth=success cred=success
auth [success=2 default=ok] pam_debug.so cred=success
pamtester -v sshd jnchi authenticate
pamtester: invoking pam_start(sshd, jnchi, ...)
pamtester: performing operation - authenticate
Connected
Enter the following code at https://aka.ms/devicelogin : B9EKNA4BD
Please hit enter after you have logged in.
Connected
parsed
parsed
auth=success
pamtester: successfully authenticated
Note: Commented out aad.so
line in /etc/pam.d/sshd
and authentication still failed.
Nov 29 16:05:52 pam_aad pamtester: pam_unix(sshd:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost= user=jnchi
PAM: Authentication failure, with valid password
Switch on PAM debugging to Syslog
Nov 29 18:30:55 pam_aad unix_chkpwd[32649]: check pass; user unknown
Nov 29 18:30:55 pam_aad unix_chkpwd[32649]: password check failed for user (jnchi)
Nov 29 18:30:55 pam_aad pamtester: pam_unix(sshd:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost= user=jnchi
Note: pamtester only works if testing from the same user account i.e. the user being authenticated; still cannot login via ssh.
from pam_aad.
/etc/ssh/sshd_config
PasswordAuthentication yes
ChallengeResponseAuthentication yes
UsePAM yes
from pam_aad.
Related Issues (20)
- Error parsing debug flag in config file HOT 1
- Python Implementation
- Branding guidelines for applications
- Check for Group membership before sending an email
- Docker script failing in Travis
- Hardened Build System
- Secure Vulnerability Disclosure
- CII Best Practices Badge Program HOT 1
- Microsoft Authenticator for authentication
- Support for macOS HOT 1
- Push images to docker registry
- Update maintainer email address for Debian packages HOT 1
- Add a check to block certain users HOT 1
- Normalize input before comparing
- pam_aad.c:4:21: fatal error: sds/sds.h: No such file or directory HOT 5
- First login failed HOT 2
- Bintray EOL
- login issue
- is this still under maintenance ? HOT 3
- sds/sds.h: No such file or directory HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pam_aad.