無法以 root 以外的任何使用者身分登入 - 沒有錯誤訊息

無法以 root 以外的任何使用者身分登入 - 沒有錯誤訊息

我相信一旦你知道要去哪裡找,事情就非常簡單了。

這是在運行 Raspbian 的 Orange Pi PC v1.2 上發生的,因為它是由橙皮網。除了 root 之外,我無法以任何使用者登入。

我已經新增了幾個用戶adduser,我無法使用Ctrl++控制台、via或 via中Alt的任何用戶。F1sussh

(我添加了公鑰以~/.ssh/authorized_keys2避免輸入太多內容)。

su?不:

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

ssh?不:

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

然後,而不是預期的提示:mario@orangepi:~$

我退出了:Connection to orangepi closed.

時間戳Last login會在任何嘗試中更新,這意味著我確實登入了,但之後有些東西立即將我註銷。

可以肯定的是,這就是我的/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:~# 

如果我以 root 身份登錄,一切都會按預期進行(我進入了盒子)。


稍後的測試(使用盒子的數字地址orangepi):

mario@rune:~$ ssh [email protected] ls -m
mario@rune:~$ ssh [email protected] ls -m ~mario
pistore.desktop
mario@rune:~$

所有這些都ssh mario@orangepi一致地登入/var/log/auth.log為:

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

我還檢查了是否可能存在一些pam配置問題:

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

後來我決定不使用 Raspbian 並安裝了 Lubuntu,一切正常,但我留下了一個問題,Orange Pi Raspbian 映像有什麼問題?

答案1

執行此命令即可解決該問題

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

並重新啟動。我不知道為什麼,但它有效。

來源 -橙皮論壇

相關內容