4

I'm sure it's something very simple, once you know where to look.

This is happening on an Orange Pi PC v1.2, running Raspbian, as it is distributed by orangepi.org. I can't login as any user except root.

I have added a couple of users with adduser, and I cannot use any from the Ctrl + Alt + F1 consoles, nor via su, nor via ssh.

(I have added the public keys in ~/.ssh/authorized_keys2 in order to avoid so much typing).

su? No:

root@orangepi:~# su mario
root@orangepi:~# 

ssh? No:

mario@rune:~$ ssh mario@orangepi
Linux orangepi 3.4.39 #41 SMP PREEMPT Sun Jun 21 13:09:26 HKT 2015 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Mar 23 08:51:43 2016 from rune.lan

Then, instead of the expected prompt: mario@orangepi:~$

I get logged out: Connection to orangepi closed.

The Last login timestamp gets updated at any attempt, meaning I do get logged in, but something logs me out immediately after.

To be sure, this is what I have in my /etc/passwd:

root@orangepi:~# grep mario /etc/passwd
mario:x:1002:1006:Mario Frasca,,,:/home/mario:/bin/bash
root@orangepi:~# ls -ld /home/mario
drwxr-xr-x 3 mario mario 4096 Mar 23 08:36 /home/mario
root@orangepi:~# ls -ld /bin/bash 
-rwxr-xr-x 1 root root 813992 Sep 25  2014 /bin/bash
root@orangepi:~# 

If I log in as root, all goes as expected (I get in the box).


Later test (using numeric address for orangepi box):

mario@rune:~$ ssh mario@192.168.1.107 ls -m
mario@rune:~$ ssh root@192.168.1.107 ls -m ~mario
pistore.desktop
mario@rune:~$

All these ssh mario@orangepi are consistently logged in /var/log/auth.log as:

Mar 24 09:47:16 localhost sshd[2987]: Accepted publickey for mario from 192.168.1.89 port 40695 ssh2
Mar 24 09:47:16 localhost sshd[2987]: pam_unix(sshd:session): session opened for user mario by (uid=0)
Mar 24 09:47:16 localhost sshd[2989]: Received disconnect from 192.168.1.89: 11: disconnected by user
Mar 24 09:47:16 localhost sshd[2987]: pam_unix(sshd:session): session closed for user mario

I also checked if it could be some pam configuration trouble:

root@orangepi:~# pam_tally2 -u mario
Login           Failures Latest failure     From
mario               0    
root@orangepi:~# 

I later decided I would not use Raspbian and installed Lubuntu, where things work fine, but I'm left with the question, what's wrong with the Orange Pi Raspbian image?

1
  • I have exactly the same issue. Still looking for the solution.
    – mtasic
    Apr 30 '16 at 14:36
2

The problem can be fixed by executing this command

echo "vm.mmap_min_addr = 4096" >  /etc/sysctl.d/mmap_min_addr.conf

And reboot. I do not know why, but it works.

Source - Orange Pi Forum

2
  • thank you for the hint, I cannot confirm at the moment so I can't mark this as accepted. if I ever go back to raspbian, I will try your hint and if it does work, I will accept the answer. :-)
    – mariotomo
    Jun 23 '17 at 14:09
  • 1
    After the first reboot I got only black screen with a mouse cursor. Apparently, it was an autologin as the 'orangepi' user with bare openbox, nothing is broken now. To get a nice gui I just needed to logout/login to LXDE.
    – gluk47
    Mar 13 '18 at 23:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.