LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 08-28-2008, 03:16 AM   #1
IXL
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Rep: Reputation: 0
Home/user Files & Switching Users In Putty


Hi.

I have read up on quite a number of forums from this site and a few others and I cant quite see anything that matches my question. Maybe im wrong, but would like to be sure.

Question:

I would be grateful if someone can help me here with regards to isolating users to their own directory only. This is mainly directed at the use and viewing from FTP, Filezilla. (obviously from command prompt too...)

What I am trying to do, or rather want to achieve is when viewing files via Filezilla and logged in as (for example) "user1", they can browse another users ("user2") directory as well, from the /home/ folder. Each user can also browse all the system directories as well.

I want to only enable each user to only see and browse their OWN home folder. For example, USER1 should only see "/home/user1" I dont want them to be able to type in a directory stucture address and be able to get to another folder that way either.

What I dont want to do is loose the + sign on the home directory if I browse out of the users home directory. ( Something I made a mistake on in the past, and the only way to get back to the users home dir, was by typing it back in, in the address bar in FTP). I still want to be able to click back into it.


What Im using:

I am using a vanilla install of Fedora Core 8 (yum updated to date), with the latest Webmin installed and I have created a couple of users via webmin.

I hope this make sence?

Ive played about with CHOWN and just want to be extra careful I dont give off permissions in the wrong way. Same applies with CHMOD.

Second question:

Also, I use Putty and tend to log in each user through there own individual session, im not sure how to "manage" different logins from one session. Ie login as root and then switch to user1 and back again to root and so on..

If someone can help explain to me the above I would also appreciate it.

Thanks for reading...

IXL
 
Old 08-28-2008, 06:07 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
For the FTP part, locking down users to their home directory can be done through your FTP server, provided your using one that supports such a feature. I use VSFTP and I can configure it so that users can't get out of their home directory. You'll probably have to check into what FTP server Fedora uses by default, and if it isn't VSFTP, I would suggest changing.
Quote:
Also, I use Putty and tend to log in each user through there own individual session, im not sure how to "manage" different logins from one session. Ie login as root and then switch to user1 and back again to root and so on..
First off, please tell me that you don't allow root login via SSH. Not a good idea. Second, you can probably do what you want one of two ways. First would be to use the su command to change to the user you want to be. When you're done, you just exit and you're back to the user you logged in as. The other way to handle this would be with the screen command. By using screen you can set up as many virtual terminals as you like from a single SSH session. The nice bit is that if you disconnect from a screen session, it continues running and you can reconnect to it the next time you log in. Sort of like VNC for the command line.
 
Old 08-29-2008, 02:01 AM   #3
IXL
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Firstly, Thanks ever so much for replying...

I am new to linux to a point, Im no idiot tho..lol I do realise there are certain aspects im not aware of which is why I have signed up here. However as its a fresh vanilla install of linux, I havent made any major changes other than above because I want to be sure im doing things right. If you can tell me how I would restrict ssh access from root it would be appreciated.

Ive checked in webmin and the ftp app that comes with FC8 and is active on boot and running appears to be "VSFTPD"...

I know I didnt state this in my first post, but Im doing all this via a non gui install, just so you are aware.. Im running it a server mainly for a couple of gameservers I want to run on it for my lan events and a bit of website work to test.. nothing major.. so its not on the net or anything...
 
Old 08-29-2008, 03:55 AM   #4
Fantasio
Member
 
Registered: Nov 2007
Location: Vinsobres - Drome - France
Distribution: SuSE Linux 11.3
Posts: 152

Rep: Reputation: 19
have a look into /etc/ssh/sshd_config a line containing PermitRootLogin set it to no and restart sshd service
 
Old 08-29-2008, 07:29 AM   #5
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Fantasio has the right answer for SSH, but also be sure to set it to Protocol 2, not Protocol 1,2 and you also may want to limit users with the AllowUsers directive. Any user listed after AllowUsers are the only users allowed in via SSH.

As for vsftpd, the file you want to look at is /etc/vsftpd.conf and the directive you want is chroot_local_users=YES. That will keep local users in their home directories. The file is very well commented but you may want to look at the man page for more options. Be sure to restart xinetd after you make the changes (assuming you're running ftp through xinetd and not as a standalone).

Both of these files are just text files, so they can easily be edited with any console editor.
 
Old 08-30-2008, 03:45 AM   #6
IXL
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you both ever so much, its so much appreciated. Well explained as well.

I will give them a good going over when I get time tonight and let you know if its sorted my questions...

IXL
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
switching users using user switcher applet Greebstreebling Debian 2 05-17-2007 12:02 PM
Switching A User & Locking Screen VIR3NT SUSE / openSUSE 1 06-12-2006 05:31 PM
Suse 9.1, switching users and no sound for second user. webwolf70 Linux - Distributions 0 08-24-2004 03:48 PM
ProFTPD for chrooted users (/home/hosting/user) ? Niels@debian Linux - Software 5 08-12-2004 07:38 PM
grant user access to /fat-c & copying users' preferences to another user n0x Linux - Newbie 1 07-04-2004 12:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration