LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-26-2009, 08:57 AM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,697

Rep: Reputation: 48
How to setup users for FTP only!


I have an existing RHEL FTP server, but I have no clue how to create a new user with an FTP account only, I don't want them to be able to SSH or anything else other than FTP. any ideas?
 
Old 08-26-2009, 09:00 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Set the shell to something like /bin/nologin or /bin/false; not sure what is available in RH.
 
Old 08-26-2009, 09:03 AM   #3
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Code:
[root@cuba samba]# cat /etc/shells
/bin/sh
/bin/bash
/sbin/nologin
/bin/tcsh
/bin/csh
/bin/ksh
so if using /bin/false, be sure to add it here otherwise above poster is correct, apply /sbin/nologin as that users shell
 
Old 08-26-2009, 09:13 AM   #4
kdelover
Member
 
Registered: Aug 2009
Posts: 311

Rep: Reputation: 36
and set up the home directory of the user to /var/ftp/ with usermod -d <ftpuser> command
 
Old 08-26-2009, 09:13 AM   #5
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,697

Original Poster
Rep: Reputation: 48
ok, so I would do something like

adduser JoeFTP -c JoeFTPAccount -p passwordgoeshere -s /sbin/nologin

and that would create me a new ftp account named JoeFTP, with a comment of JoeFTPAccount, and not allow that user to SSH or log in locally to the server?

adding users in general is new to me, so thanks for double-checking and putting up with me.
 
Old 08-26-2009, 09:19 AM   #6
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,697

Original Poster
Rep: Reputation: 48
when all the users log in to the ftp site they get put into a folder /home/username type folder, is that kinda what you were talking about kdelover?
 
Old 08-26-2009, 09:21 AM   #7
kdelover
Member
 
Registered: Aug 2009
Posts: 311

Rep: Reputation: 36
where do you want the ftp users to go after they log in? to their home directories or to the upload/download area?If you want them to go straight to the upload and download directory then change the home directory to that.

Last edited by kdelover; 08-26-2009 at 09:22 AM.
 
Old 08-26-2009, 09:22 AM   #8
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,697

Original Poster
Rep: Reputation: 48
I guess i want them to go to /home/username just like my account does, which someone else setup. sorry for all the dumb questions, still learning.
 
Old 08-26-2009, 09:24 AM   #9
kdelover
Member
 
Registered: Aug 2009
Posts: 311

Rep: Reputation: 36
Ok cool then forget what i said,i usually make 2 directories upload and download in /var/ftp and set the homedirectory of my ftpusers say ftp1 ftp2 ..so on to /var/ftp/. When they login they go straight into the /var/ftp/ .
 
Old 08-26-2009, 09:25 AM   #10
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,697

Original Poster
Rep: Reputation: 48
ok, so to have them go to /home/username i dont have to do anything extra?
 
  


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
How to setup FTP users only users on LInux Fedora Soujiro Linux - Newbie 8 09-13-2010 07:34 AM
Struggling to setup a Debian/etch desktop: LDAP users and LOCAL users jferrando Linux - Networking 1 05-05-2006 03:44 PM
ftp users setup tbadone Linux - General 2 04-24-2006 01:34 AM
FTP Server Up and running... how do I hide ftp users from local login screen? joe1031 Mandriva 2 03-18-2005 04:24 PM
how can I restrict ftp users listing files from a pure-ftp server adrianmak Linux - Networking 2 12-31-2002 08:23 AM

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

All times are GMT -5. The time now is 07:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration