Find the answer to your Linux question:
Results 1 to 8 of 8
Hi All, How do I lock a user to a directory? I have changed their home directory to where I want them to be, but they can still see the ...
  1. #1
    Just Joined!
    Join Date
    Feb 2007
    Posts
    4

    User Accounts

    Hi All,

    How do I lock a user to a directory?

    I have changed their home directory to where I want them to be, but they can still see the other directories.

    Thanks
    wazzy_c

  2. #2
    tpl
    tpl is offline
    Linux User
    Join Date
    Jan 2007
    Location
    cleveland
    Posts
    452
    you might try "rbash" as that user's shell
    the sun is new every day (heraclitus)

  3. #3
    Just Joined!
    Join Date
    Feb 2007
    Posts
    4
    Hi there,

    thanks4 the help. Can you please provide me with a more detailed answer regarding bash ?

    THX

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    hi wazzy_c !

    Welcome to the LinuxForums.

    check man pages of 'rbash'.
    man rbash.




    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  5. #5
    Just Joined!
    Join Date
    Feb 2007
    Posts
    4
    Thanks for the help ppl.

    Please would someone explain to me excatly how to lock a user in a certain directory so that the user cannot cd into other directories

  6. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    which linux distro are you using?




    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #7
    Just Joined!
    Join Date
    Feb 2007
    Posts
    4
    Fedore Core 3

  8. #8
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    okk !
    set group and other permissions of each user's home folder to null.
    by default, users have read permissions, they can 'cd' to other user's home folders and view files.
    use chmod command to set permissions.
    Code:
    chmod 700 /home/<user's_home_folder>
    check manual of chmod too.




    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

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