Home  >  Article  >  Operation and Maintenance  >  What to do if Linux users cannot log in

What to do if Linux users cannot log in

藏色散人
藏色散人Original
2020-05-25 10:09:349013browse

What to do if Linux users cannot log in

What should I do if a Linux user cannot log in?

Solution to the error that the Linux system user cannot log in

The Linux system user created the user user, the user is liuqiang, and the system login error is reported;

Recommendation: "linux tutorial"

After the user logs in to the system, the root/directory is displayed;

Last login: Sat Jan 13 14:07:31 2018 from mu02
[root@c02b03 ~]# su liuqiang
bash: /home/liuqiang/.bashrc: Permission denied
bash-4.1$ ls -l /home

Solution:

Use the command ls -l /home to check the permissions in the directory. It is found that the owner and group of user under /home of user user have been changed and are no longer user;

Use the following command to modify the user's owner and group:

sudo chown user(属主)-R  /home/user;
sudo chgrp user(属组)-R  /home/user;

For example:

chown liuqiang  -R /home/liuqiang
chgrp liuqiang -R /home/liuqiang

Check again that the user's owner and group are both liuqiang;

Reuse User user login: Login successful;

Or directly use chown -R -v liuqiang6:liuqiang6 hadoop-1.2.1

In this way, the owner of the directory and the files below will be changed.

Check mount -l there is /lustre/home on /home type none (rw,bind)

Execute umount /home.

The above is the detailed content of What to do if Linux users cannot log in. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn