sftp icon indicating copy to clipboard operation
sftp copied to clipboard

No connection if users binded to UID and GID of the root (0:0)

Open sdotb opened this issue 1 year ago • 3 comments

binding data in users.conf file:

user1:pwd1:1000:1000 user2:pwd2:0:0

user 2 cannot login

sdotb avatar Aug 26 '23 16:08 sdotb

tried also setting environment in docker-compose.yml seems not working, with new version of image i obtain a warning in logs referred to user UID out of range

environment:
  - MIN_UID=0
  - MAX_UID=6000

sdotb avatar Aug 26 '23 16:08 sdotb

Hello ! I am not a maintainer of this repository but I think this may be due to the config line PermitRootLogin no in the file /etc/ssh/sshd_config. You can find a way to change the config in the PR #382

adrian-amaglio avatar Oct 10 '23 18:10 adrian-amaglio

Adrian's solution is correct, If I may offer an alternative in Containerfile/Dockerfile, i think it's easier to understand at first glance:

RUN sed -i -e 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config

TheSiman avatar Jan 16 '24 12:01 TheSiman