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.
Limited to not be able to browse folders outside their home folder.
This is rather difficult on a unix system. You'd need a custom version of ls that refused pathnames outside the user's home directory (and custom versions of any other program that could list directories). You'd probably also need to remove any program that can run a shell (so most text editors are out etc).
Bash's restricted mode (-r) is a partial option but not a very good one. You have to use --norc otherwise the -r mode can be trivially circumvented with an e.g. 'exec zsh' at the end of the user's ~/.bashrc. But then users wouldn't be able to create their own aliases and so forth. I wouldn't like to be stuck in that environment. Less claustrophobic alternatives would be to use a chroot jail or user-mode-linux.
To login from outside the LAN, you would have to specifically forward port 22 on your router, so by default no-one from the outside can log in.
I am opening port 22 on the router for access from outside. I just want some usernames to be allowed this access. Some users tend to stick with passwords which are very simple. This is fine as long as I can prevent their accounts from being used outside of the LAN.
I am opening port 22 on the router for access from outside. I just want some usernames to be allowed this access.
You can use the AllowUsers, DenyUsers, AllowHosts, and DenyHosts options (in /etc/ssh/sshd_config) for access control. Probably the easiest way is just to list the users you want to allow access to in AllowUsers. The syntax is just 'AllowUsers user1 user2 etc'. This will deny access to anyone not in the list. Alternatively, DenyUsers will reject only those users listed and so on.
I believe that root access is handled separately to other users, via the PermitRootLogin option. This can have the values "yes", "no", "without-password", or "forced-commands-only". Yes and no are obvious, the others are explained in the sshd_config man page. Note, though, that it is generally discouraged to login directly as root, but rather to use a normal user account and su/sudo.