Find the answer to your Linux question:
Results 1 to 3 of 3
Hi , I have fedora 7 on my system . Whenever , each user is created ...a new directory of the user is created in HOME/user directory . If we ...
  1. #1
    Just Joined!
    Join Date
    Jun 2007
    Posts
    80

    how can i create Single home dirctry for any number of users created with any names ?

    Hi ,

    I have fedora 7 on my system .

    Whenever , each user is created ...a new directory of the user is created in HOME/user directory . If we go on adding the number of users ..the size of the HOME will keep on increasing .

    Now please let me know ..how can I link all the user's ( created on any name ) to a common home directory . This setting has to be automatic since
    ln -s needs to be added to each and every user created ...

    Regards,
    Deepak

  2. #2
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    Quote Originally Posted by dskonnur View Post
    If we go on adding the number of users ..the size of the HOME will keep on increasing .
    Directories themselves only take a few KB of metadata. I don't think you'll actually save space by going through this method as much as causing trouble for yourself.

    That said, if you are really convinced that you want to go with this approach, you can create one home directory with permissions set for the user group to allow access from all users, or better create a specific group. Then you can amend /etc/passwd to reflect the home directory of all users - field 6 is the home directory.

    I would like to emphasise that what you are attempting to do is a bad idea for many reasons, not least of which is that it is not an actual solution to your problem at all. You can also expect to run into problems with config files that expect to have specific user permissions (.ICEAuthority is one). You may also find that one person breaks or corrupts a configuration file and causes a problem for all users. If you just need users to have access to a specific shared directory you should look into setting that directory with the correct permissions and then placing a link in each users home directory.

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Quote Originally Posted by dskonnur View Post
    Hi ,

    I have fedora 7 on my system .

    Whenever , each user is created ...a new directory of the user is created in HOME/user directory . If we go on adding the number of users ..the size of the HOME will keep on increasing .

    Now please let me know ..how can I link all the user's ( created on any name ) to a common home directory . This setting has to be automatic since
    ln -s needs to be added to each and every user created ...

    Regards,
    Deepak
    Though this isn't a good idea, you can create a single /home/users directory and use that for any number of users. The things you need to do are to:

    1. Create a group for them.
    2. chgrp /home/users to the group name.
    3. chmod g+rwx /home/users
    4. Make sure you set each user to be in that group.
    5. Make sure the umask for each user is set so that all created files are writable by the group (0002 is good).
    6. Set the home directory for each user to /home/users.

    So, the question is, which is better? To allow potentially a lot of /home directories (1 per user), or deal with the hassle of configuring each user? Well, in the past I wrote scripts to do just what I showed above on systems where a certain class of user would share one public directory, which made the management thing pretty simple. You have to decide which approach is best for your needs.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...