NO directory, logging in with HOME=/

user3162878 picture user3162878 · Dec 15, 2017 · Viewed 17.2k times · Source

I checked by doing :

cd /

then

cd home

after ls shows my directory malik

ls

malik

as shown in picture as well :

But I don't know why it is saying "No directory, logging in with" ?

Answer

pydvlpr picture pydvlpr · Dec 15, 2017

The directory permissons says

Owner: root, Group: root, Others: cannot access

I think you created the directory as user root.

Change the directorys permissons with

sudo chown malik.malik /home/malik

The sudo command gives you temporary root permissons for a specified command. If you want to get temporary root permissons for more than one command use

sudo su

Take a look here about linux file / directory permissons (LPIC)

About the seconde error message: su - malik

It seams to me that you have not set a home directory for the user malik. You find this settings in /etc/passwd. It should look like

malik:x:1000:1000:malik:/home/malik:/bin/bash

Hope that helps.

Best, me