What is the best way to make a limited account on Ubuntu Linux.

The user should only be able to read and write to the home directory.

  • 2
    This seems to be very impractical. How would the user run any programs (for example /bin/bash)? Presumably you wish to protect certain data on the same machine from this user. It might be better to ask how to protect that data instead. Even simply ensuring many users can use a machine without reading each others data is much more manageable. – spectre256 May 31 '11 at 6:25

Give them a restricted shell, e.g. /bin/rbash. Make sure they can't run binaries that would let them run arbitrary commands (such as other shells, editors with shell escapes and so on). You'll need to have a PATH containing only vetted executables.

If you only want the users to be able to copy files over SSH (with rsync, CVS and so on), not run applications, then make their shell rssh.

| improve this answer | |

This is doable but not very practical. You can put them in a chroot jail of their home directory but then you need to have copies of /bin and /usr/bin in their home directories.

I am with spectre256, better to keep them out of where you don't want them.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.