OPNsense Forum

Archive => 15.7 Legacy Series => Topic started by: HrvAtMyPlace on November 05, 2015, 12:31:59 am

Title: [SOLVED] Problem logging in via SSH as non-root user
Post by: HrvAtMyPlace on November 05, 2015, 12:31:59 am
Hello,

I've created a non-root account with same privileges as root account then disabled the root account. When I enabled Secure Shell Server with Permit password login option I'm still not able to log into OPNsense via SSH.

Image of my secure shell setting:
(http://i.imgur.com/bA65oal.png)

Image of users:
(http://i.imgur.com/8BtkDmF.png)

Image for SSH attempt:
(http://i.imgur.com/Lt4Ei5M.png)

I'm not sure if this is a bug or not. Thank you in advance for your help. Best regards,

Hrv
Title: Re: Problem logging in via SSH as non-root user
Post by: HrvAtMyPlace on November 05, 2015, 01:26:04 am
Hello,

I checked /etc/passwd and my non-root user has a "/sbin/nologin" shell. I would assume that user added via GUI with all privileges and SSH server enabled that my non-root user would have a proper shell set and be allowed a login.

Also, it seems that even though root is disabled it still has a shell of "/usr/local/etc/rc.initial". I would expect this to be disabled.

Can someone please confirm what is expected behaviour of user accounts set in GUI with respect to SSH access? Thank you in advance. Best regards,

Hrv
Title: Re: Problem logging in via SSH as non-root user
Post by: heynow on November 05, 2015, 01:31:26 am
Go back to editing the user and add the shell access...Effective Privileges section -> Add User - "System - Shell account access" - then you should be good.
Title: Re: [SOLVED] Problem logging in via SSH as non-root user
Post by: HrvAtMyPlace on November 05, 2015, 01:53:33 am
Hello heynow,

Thank you for this pointer. I missed this and assumed that adding it to admin group should have done it. I've added "User - System - Shell account access" to "admins" group which effectively did the trick. Thank you again for your help. I greatly appreciate your assistance.

Hrv