Koozali.org: home of the SME Server

ssh Permissions Revoked After Update

Offline csn

  • *
  • 11
  • +0/-0
ssh Permissions Revoked After Update
« on: May 28, 2018, 08:59:46 PM »
Hi gang,

I've got a freshly-installed SME 9.2 instance which is reluctant to let me ssh to it. I can connect as root without any issues, but every time a run a signal-event post-upgrade and reboot, e.g. after updates or changing configuration settings, my 'normal' user account can't log in.

Or rather, it nearly can - ssh connects, displays the welcome message, then immediately disconnects with the error /usr/bin/rssh: Permission denied

To fix this I need to log in as root then re-run chsh for my user, then everything's fine until the next update and reboot. This isn't a reboot-only issue - if I don't change the config I can restart with immunity.

Has anyone else come across this issue?

Thanks,
Chris

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: ssh Permissions Revoked After Update
« Reply #1 on: May 28, 2018, 09:15:17 PM »
https://wiki.contribs.org/SME_Server:Documentation:FAQ:Section01#Shell_Access

# db accounts setprop username Shell /bin/bash
# chsh -s /bin/bash username

The db accounts setprop being the key to ensuring setting survives a template expansion.
--
qui scribit bis legit

Offline csn

  • *
  • 11
  • +0/-0
Re: ssh Permissions Revoked After Update
« Reply #2 on: May 28, 2018, 09:19:29 PM »
Perfect, thank you.

I must have missed the db accounts command there while I was flicking through the FAQs, sorry for the obvious question.

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: ssh Permissions Revoked After Update
« Reply #3 on: May 28, 2018, 09:34:09 PM »
No question is obvious :-) how many times has it needed another set of eyes to see a different answer :-)
--
qui scribit bis legit