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!
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.
Click Here to receive this Complete Guide absolutely free.
I'm still confused why the only way new home directories can be created using "useradd" is when a partition is not mounted to my home directory. Initially I assumed the problem was due to the partition being NTFS, but when I tried mounting a Linux partition I had the same trouble. When nothing is mounted it works fine.
If you need more information, I apologize. I'm at a loss for what else to include.
1. NTFS partitions behave differently than Linux partitions (different types of permissions, etc.). I would not recommend using an NTFS partition for Linux user home directories.
2. What kind of Linux partition did you try (ext3, ext4, other)? Did youy check and make sure that it was mounted as writeable? What do you get when you do "sudo mkdir /home/foo" directly ... does it work or do you still get a permission denied error? If it doesn't work please post the output of "df -h", "cat /etc/fstab", and "cat /etc/mtab".
So that we can see what is going on here please post the output of the following commands when /home is mounted.
mount | grep home
ls -al /home
It may also be useful to post the output of
grep home /etc/fstab
Ps. you can create the directories when /home is not mounted, because in that situation /home is just a mount point ie a directory in your / partition which is presumably a sane file system with sensible permissions.
bluegospel i would do some reading and learn about partitions and setting up a linux install
-- edit --
i take it this is slackware ? this should have been covered in the install/build documentation .
1) you CAN NOT( and you never could ) use MS Windows NTFS as a /home partition
2) "/dev/hda7 /home Linux umask=077 1 0"
there is no file system called "linux" ( the most common are ext3 and ext4 )
3) also "/dev/hda2 /windowspartition ntfs-3g umask=077 1 0 "
-- and --
/dev/hda8 /sharedpartition ntfs-3g umask=077 1 0
most of the time mounting DIRECTLY to / is a VERY,VERY bad idea
that is why there is a /mnt folder
In addition to what John VV said, you shouldn't need the umask option for a native Linux (ext3, ext4, etc.) mounted filesystem as these filesystems support *nix-style permissions correctly. The umask setting is usually used as a hack to apply sane permissions to filesystems that don't natively support *nix-style permissions.
Pardon my infancy in Linux, but what are "sane permissions?"
Off topic, how do I view other instances of manpages (e.g., "man sane" outputs "sane (7)" which I believe is not my answer. What about 1-7, et al?)
"Sane permissions" are just slang I was using. What I meant was that since non-*nix filesystems don't saupport Unix style permissions natively, there has to be some way to make them use them. Therefore, the partition is usually mounted with all files having a specified user, group, and umask. All permissions are allowed on the file except those denied ny the umask. For a umask of 077, the owner will be allowed to do anything to the file, but no one else will be allowed to do anything. If you don't understand why this is, then you need to do some reading on Unix-style permissions. It's generally unnecessary to apply a umask when you've mounted a native Linux filesystem as these filesystems support Unix-style permissions natively and you can properly set permissions on individual files.