[SOLVED] How do I change change the home directory to be owned by me and not root? Slackware

User Name

Remember Me?

Password

Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!

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.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

How do I change change the home directory to be owned by me and not root? Slackware

I've already done the following commands

Code:

su
chown theif519 /home/theif519
chmod 775 /home/theif519
exit
#usermod -d /home/theif519 login *I would also like for someone to explain how this command works, if you'd be so kind*

I've logged out and logged back in, and I was successful in making it the default directory it logs in to. Still, afterwards I noticed that that when I use the list all commands "ls -l" it shows that root owns it and it also shows that I do not, by default, have read write execute over it, only read execute. Sorry if I'm not making any sense. *I'm using Slackware 13.37* in a Virtual Machine*

Another thing, I don't think I added any rights to my user, how do I give it more rights as well? Like, wheel and sudo and all of that stuff.

Also, this was the website I was using *Although it didn't help much, the comments sure did*

The command you mentioned should work. Not sure why it is showing root as owner in ls -l. I would suggest you to try the following thing:

1. su - root
2. chown theif519.theif519 /home/theif519 /* You are making theif519 user private group and the user itself to be the owner:group of that particular home directory

3. chmod 775 /home/theif519 /* I would suggest you should use chmod 644 /home/theif519 instead */

4. Do ls -l /home

5. Exit

6. Login as the user and see if you have got the required rights. Perform ls -l using your user account in /home. ls -l /home

Let us know if it works.

Thank you, by using part of what you suggested

Code:

chown theif519.theif519 /home/theif519

It now shows it owned by me. I hope that this means that from now on, whatever I add, it's contents will belong to me instead of root. Now another thing, is this enough, or do I need to add my account to more groups like wheel and sudo?

Yes, it will belong to the user account from now onwards. One more thing you could do to modify the existing ownership under your home directory is the following command:

chown -R theif519.theif519 /home/theif519

The above command will recursively change the ownership of the file underneath the user's home directory. Beaware, never run this command on / as it might lead to non-recoverable situation as it changes the ownership recursively.

Sorry in the first post I forgot to explain this:

#usermod -d /home/theif519 login *I would also like for someone to explain how this command works, if you'd be so kind*

The above command instruct the system that modify the user's home directory to be the one that followed by -d and --login or -l will be the login name of the user.

This command is usually used when either user's home directory or user account has been renamed.