Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper Default Shell for Newly Created User using RADIUS Authentication #19884

Open
amazor opened this issue Aug 12, 2024 · 1 comment
Open
Assignees
Labels
BRCM Triaged this issue has been triaged

Comments

@amazor
Copy link

amazor commented Aug 12, 2024

Set-up

Sonic_DUT (10.1.1.1) connected to FreeRadius Server (10.1.1.2)

Client Configurations (SONiC 202405)

config radius add 10.1.1.2 -a pap -k mySecret
config radius nasip 10.1.1.1
config aaa authentication login radius local
config aaa authentication failthrough enable

Server Configurations (FreeRadius 3.0.26)

Edit /etc/freeradius/3.0/users
Add a new user at the top of the file:
testuser Cleartext-Password := "testuser"

Edit /etc/freeradius/3.0/client.conf
Add a new client with it’s ipaddress and secret key

client Sonic_DUT {
        ipaddr = 10.1.1.1
        secret = mySecret
}

Steps to Reproduce

  1. Verify "testuser" does not exist in /etc/passwd

  2. Attempt to login with "testuser" for first time using Console

sonic login: testuser
Password:
Linux sonic 6.1.0-11-2-amd64 #1
Debian GNU/Linux 12 sonic ttyS0

sonic login:

Can see that the user succeeds, but is immediately booted

  1. Check /etc/passwd and see that user is created with non-existent shell as default process

testuser:x:1001:1006:testuser:/home/testuser:/usr/bin/sonic-launch-shell

Describe the results you received:

In RADIUS authentication through Console (with non-existent user in DUT), the client is succesfully authenticated using RADIUS, and a user will be created, but the default shell is incorrect.
The "/usr/bin/sonic-launch-shell" application does not exist.
This results in the user being logged-in and booted immediately.

Describe the results you expected:

The newly created user should have a working shell (such as /usr/bin/bash) with the proper permission.
The user will be able to login.

@shdasari
Copy link
Contributor

Hi,

This issue is a duplicate of #11352. You can pick the fix for this issue from #14466 and that should solve the issue.

@adyeung adyeung added Triaged this issue has been triaged BRCM labels Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BRCM Triaged this issue has been triaged
Projects
None yet
Development

No branches or pull requests

3 participants