DNS-320L, RC5, PuTTY.I can't login to a SSH with anything but root and webUI password. When I try logging in as a configured user, the terminal window closes after entering the password.
I found this in the log,but I don't know what to do to fix the issue. Could you please point me in the right direction?
id enricogrep enrico /etc/passwdgrep enrico /etc/group
ls -l /home
Can "enrico" use telnet to login the box, instead of ssh (putty?)
Can you create a dummy test user using the webUI, Setup->Users, and see if he can login?
Jan 15 23:29:44 DNS-320L-032050 authpriv.info dropbear[755]: Child connection from $PUBLICIP Jan 15 23:29:50 DNS-320L-032050 authpriv.notice dropbear[755]: Password auth succeeded for 'maurizio' from $PUBLICIP Jan 15 23:29:50 DNS-320L-032050 authpriv.info dropbear[758]: Exit (maurizio): Error changing directory Jan 15 23:29:50 DNS-320L-032050 authpriv.err dropbear[758]: chown /dev/pts/0 0 0 failed: Operation not permitted
[root@dns-323]# ls -l /homelrwxrwxrwx 1 root root 15 Jan 10 19:10 /home -> /mnt/sda2/Users
[root@dns-323]# ls -l //mnt/sda2/Userstotal 16drwxr-xr-x 4 root root 4096 Jun 25 2016 .drwxr-xr-x 8 root root 4096 Jan 10 19:11 ..drwx--s--x 2 jcard users 4096 Jan 15 18:51 Joao Cardosodrwx--s--x 2 manulima users 4096 Dec 16 20:37 Manuela Lima
So, users don't have a home directory, they can't login.A 'Users' folder should have been created by the webUI first login wizard in the base of the specified filesystem, and each created user has a directory with its Real Name there. When the "Users" is found at disk discovery/mount time, it is mapped to /home:[root@dns-323]# ls -l /homelrwxrwxrwx 1 root root 15 Jan 10 19:10 /home -> /mnt/sda2/Users[root@dns-323]# ls -l //mnt/sda2/Userstotal 16drwxr-xr-x 4 root root 4096 Jun 25 2016 .drwxr-xr-x 8 root root 4096 Jan 10 19:11 ..drwx--s--x 2 jcard users 4096 Jan 15 18:51 Joao Cardosodrwx--s--x 2 manulima users 4096 Dec 16 20:37 Manuela LimaSo, whatever happened it has to do with your renaming. What exactly have you done?You cant rename disks, only give a label to a filesystem, which changes the "mountpoint", i.e., a filesystem is mounted at /mnt/filesystem_device_name, such as /mnt/sda2, or /mnt/filesystem_label, such as /mnt/Videos; a folder named "Users" must exists at the base of one filesystem, e.g. /mnt/sda2/UsersHave you already save settings and rebooted after the renaming? The discovery is done at boot time.
hot_aux: Start fscking sda4hot_aux: Users directory found in sda2hot_aux: Public directory found in sda2
[root@dns-323]# ls -l /homelrwxrwxrwx 1 root root 15 Jan 10 19:10 /home -> /mnt/sda2/Users
ls -l / /mnt/SDA/Users/
Sorry for all the trouble.
Does /mnt/SDA/Users/Enrico exists? belonging to 'enrico' (Enrico nick name)?
It is also possible that the Users directory has not been detected, you can see that at /var/log/hot_aux.log. In my log, I can seehot_aux: Start fscking sda4hot_aux: Users directory found in sda2hot_aux: Public directory found in sda2and then a link should automatically be created to it:[root@dns-323]# ls -l /homelrwxrwxrwx 1 root root 15 Jan 10 19:10 /home -> /mnt/sda2/Users
DATE=Sun Jan 15 10:42:22 CET 2017 USER=root HOME=/ OLDPWD=/ MDEV=sda2 TERM=vt102 SUBSYSTEM=sda PATH=/sbin:/usr/sbin:/bin:/usr/bin SHELL=/bin/sh PWD=/dev hot_aux: Start fscking sda2 hot_aux: Finish fscking sda2: fsck 1.41.14 (22-Dec-2010) SDA: clean, 47767/122068992 files, 306956579/488246928 blocks hot_aux: Users directory found in SDA DATE=Sun Jan 15 10:42:23 CET 2017 USER=root HOME=/ OLDPWD=/ MDEV=sdb2 TERM=vt102 SUBSYSTEM=sdb PATH=/sbin:/usr/sbin:/bin:/usr/bin SHELL=/bin/sh PWD=/dev hot_aux: Start fscking sdb2 hot_aux: Public directory found in SDA hot_aux: Alt-F directory found in SDA hot_aux: Finish fscking sdb2: fsck 1.41.14 (22-Dec-2010) SDB: clean, 217214/122068992 files, 388147116/488246928 blocks hot_aux: Backup directory found in SDB hot_aux: Alt-F directory found in SDB but not used, as file NOAUFS exists on it. hot_aux: Executing "/mnt/SDB/user.sh start" in background Downloading https://downloads.sourceforge.net/project/alt-f/pkgs/stable/Packages Updated list of available packages in /usr/lib/ipkg/lists/feed_1 Downloading https://downloads.sourceforge.net/project/alt-f/pkgs/unstable/Packages Updated list of available packages in /usr/lib/ipkg/lists/feed_2 Successfully terminated. hot_aux: Restarting transmission-daemon: Stopping transmission-daemon: OK. Starting transmission-daemon: OK.
Does /mnt/SDA/Users/Enrico exists? belonging to 'enrico' (Enrico nick name)?root@DNS-320L-032050]# cd /mnt/SDA/Users[root@DNS-320L-032050]# ls -ltotal 8drwx--s--x 17 enrico users 4096 Jan 9 19:15 Enricodrwx--s--x 2 maurizio users 4096 Jan 15 13:36 Maurizio
I believe it does, and I believe it's got the right permissions, since I can correctly access the relative Samba share from Windows, using 'Enrico' 's credentials. Still:[root@DNS-320L-032050]# ls -l /homels: /home: No such file or directory
It is also possible that the Users directory has not been detected, you can see that at /var/log/hot_aux.log. In my log, I can seehot_aux: Start fscking sda4hot_aux: Users directory found in sda2
hot_aux: Public directory found in sda2and then a link should automatically be created to it:[root@dns-323]# ls -l /homelrwxrwxrwx 1 root root 15 Jan 10 19:10 /home -> /mnt/sda2/UsersHere's the content of hot_aux.log:DATE=Sun Jan 15 10:42:22 CET 2017 USER=root HOME=/ OLDPWD=/ MDEV=sda2 TERM=vt102 SUBSYSTEM=sda PATH=/sbin:/usr/sbin:/bin:/usr/bin SHELL=/bin/sh PWD=/dev hot_aux: Start fscking sda2 hot_aux: Finish fscking sda2: fsck 1.41.14 (22-Dec-2010) SDA: clean, 47767/122068992 files, 306956579/488246928 blocks hot_aux: Users directory found in SDA
DATE=Sun Jan 15 10:42:23 CET 2017 USER=root HOME=/ OLDPWD=/ MDEV=sdb2 TERM=vt102 SUBSYSTEM=sdb PATH=/sbin:/usr/sbin:/bin:/usr/bin SHELL=/bin/sh PWD=/dev hot_aux: Start fscking sdb2 hot_aux: Public directory found in SDA hot_aux: Alt-F directory found in SDA
hot_aux: Finish fscking sdb2: fsck 1.41.14 (22-Dec-2010) SDB: clean, 217214/122068992 files, 388147116/488246928 blocks hot_aux: Backup directory found in SDB hot_aux: Alt-F directory found in SDB but not used, as file NOAUFS exists on it.
I think that you can recover by executing the commandln -s /mnt/SDA/Users /homePlease post its output. If that succeeds without error messages, you should be able to login as a normal userFor diagnose please post also the again the output of:ls -l /ls -la /Alt-F
You have a non-active folder Alt-F folder in SDB, the one from SDA is being used as it is found earlier. There is no harm, but if you don't need the SDB one it you can delete it (Packages->Alt-F, "Packages Installed On" section)
and creating a link fixed the issue. I already tried rebooting the box, and I can still login fine. I'm sure I didn't touch the contents of /Alt-F,
so I can't tell what caused the issue.
Do I need to do anything else?
Yes. But to know why it was not created you had to run the 'ls -la /Alt-F' command before creating the symlink.
The symlink is always automatically created when the Users folder is find at boot time, and I would like to know why did that failed for you before.
You might not done that intentionally, but if you have defined SDA to be a network share the Alt-F folder will then appear when browsing.
If you have already rebooted and are able to ssh/telnet login as a normal user without issues, you are OK.