Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've just done a clean install of Fedora 25 - clean all except the /home directories are on a separate disk/partition and are a carry over from the previous installation (F23). I added myself as a user and checked that the /home path contained my directory and my files and had the correct UID/GID (1000:100).
When I log in all goes well until I open a Terminal. At this point the prompt shows the current working directory as / not ~ as I would expect. 'ls -l' shows the path is actually / and the usual suspects are listed (dev, etc, sys, var, usr etc) all owned by root.
If iI then type 'cd' the prompt path does become ~ and my files are listed by 'ls'.
This is strange behaviour. Not something I've ever seen before (I've been using Linux since 1993 - kernel 0.99pl12)
The contents of my .bashrc and .bash_profile all seem to be normal. It would appear that the login process fails to set the correct path. The path in /etc/passwd is correct.
The environment variable $HOME is set correctly as even when the Terminal prompt is showing / as the path.
If I log in via ssh the prompt is ~ It only appears to be wrong in the Terminal window until I perform a 'cd'.
HOWEVER, if i create a new user using Settings -> Users the behaviour is normal. So the anomalous behaviour is something to do with the hold-over from my old F23 installation. The major difference between creating a new user and my old user is all new skeleton files that are added to the new home directory.
Anyone have any idea why this might be happening? It's driving me up the wall.
fstab needs to reflect change or address to partition of /home
Code:
point of origin -> destination
/dev/sdxx /home ext4 defaults 0 1
along with what @AwesomeMachine said.
whenever I do this, because I keep my / (root) and /home separate
during install point it to /dev/sdxx /home no format
then create my user by the same name that is already there, it just says home/user name already there, no big deal, then give my user a password, log out of root then into my user no problem.
Yep, fstab has just such an entry (except I use LABEL=/home to identify the disk/partition) and I do just the same as you during and after the install. I got the message about the home/user name already there. But unlike you when I logged out of root and into my account there is this problem!
@AwesomeMachine
The /home/user directory and all the files therein have the correct UID/GID already.
This problem only occurs when I use the GUI (presumably Gnome 3) NOT when I log in via ssh. What's the difference?
Well here's a strange occurrence. For unconnected reasons I set SELINUX=disabled in /etc/selinux/config and my problem has gone away!
If anyone can explain that I'd be very interested.
Thanks for all the suggestions AwesomeMachine & BW-userx.
Cheers
Chris
It looks like maybe you been put on the DOD list .. you know that LIST
Quote:
Security-Enhanced Linux (SELinux) is a Linux kernel security module that provides a mechanism for supporting access control security policies, including United States Department of Defense–style mandatory access controls (MAC).
SELinux is a set of kernel modifications and user-space tools that have been added to various Linux distributions. Its architecture strives to separate enforcement of security decisions from the security policy itself and streamlines the volume of software charged with security policy enforcement. The key concepts underlying SELinux can be traced to several earlier projects by the United States National Security Agency (NSA).
Probably SELinux has the other disk wrongly labeled. Try relabeling (see man selinux).
A check shows the context on my system is
/home home_root_t
/home/david user home directory
/home/david/* user data
Last edited by DavidMcCann; 02-08-2017 at 10:32 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.