# Enabling FTP & Telnet configuration on SUSE Linux 10.0



## hkorema

I have SUSE 10.0 and windowsXP pro on a small LAN. What is the configuration setup to enable ftp and telnet on the Linux box?


----------



## Skie

You're better off using SSH instead of telnet for a number of reasons. Even if you'll be using this over a private network, it's still a good practice to use SSH since telnet is now disabled by default on most, if not all, distro's. 

This link should get you going with setting up FTP: http://forums.suselinuxsupport.de/index.php?showtopic=45208&hl=


----------



## hkorema

Hi,

I got SSH working on the first instance, however since am a newbie need more graphically detailed help.

The good news is have managed to get ftp working.

Anyway way I can configure for authenticated/authorized users only?


Thanks


----------



## Skie

With both FTP and SSH, only users who have an account on the system will be allowed to login. The only exception would be Annonymous FTP, which can (and should) be disabled. To do this, follow these steps:

Open a terminal window.
Type: pico /etc/vsftpd/vsftpd.conf
Find: anonymous_enable=YES
Change that to: anonymous_enable=NO
Hit CTRL+o to save
Hit CTRL+x to exit
Type: /sbin/service vsftpd restart

And that should do it.


----------



## hkorema

Tops local ftp is now working.

'Type: /sbin/service vsftpd restart' this statement did not work on SUSE Linux 10. Anyway a full restart is working for me...

I would like to create a common (shared) environment whereby only authorized users have access to. And that within this environment directories will be created and access previledges assigned accordingly.

What are the neccessary commands/tools required?


----------



## lensman3

You need to create user id/names. Look at the commands useradd, usermod, and userdel. Also look at groupadd, groupdel, and groupmod programs. Groups will have to be added before a user can be added. User id's live in "/etc/passwd" and group id's live in "/etc/group". Encripted passwords are found in "/etc/shadow", they used to be found in the 2nd field "/etc/passwd".

The program "passwd" will activate/modify/delete a users password. Passwd will complain if your password is less than 5 letters or can be found in a dictionary. Just type the password again and it will accept the shorter password.

User id's start at 500 and go up. Id's less than 100 are considered reserved for root/wheel privileged users. The numbers between 100 and 499 are, as I understand it, reserved to the OS manufacturers for their own programs and use. The root id is always 0.

Play with adding/modifying/deleting users. You can't hurt anything. Just don't delete root or your computer's Linux may never start again. DO NOT change your login id while X windows is running. Say from 500 to 501, X-windows gets really confused and sub-windows don't start like they should. To fix this problem you have to kill X-windows to get to run level 3, delete all the files and in /tmp that have the old id number, and then restart X. 

Adding a Linux and a MAC OX 10.x (or a second Linux) computer to your network will require synchronization of id's between the MAC and Linux. The nfs file system requires all users across the network to have the same user-id. 

Then login with ftp or ssh and the new user will go to the correct home directory. The default home directory is a field in /etc/passwd.

Good luck.


----------



## Skie

hkorema said:


> Tops local ftp is now working.
> 
> 'Type: /sbin/service vsftpd restart' this statement did not work on SUSE Linux 10. Anyway a full restart is working for me...
> 
> I would like to create a common (shared) environment whereby only authorized users have access to. And that within this environment directories will be created and access previledges assigned accordingly.
> 
> What are the neccessary commands/tools required?


Another posibility would be to type "/etc/init.d/vsftpd restart". However, I'm no longer familiar with SUSE, so this path could be different. If that doesn't work, you could look in /etc/ for a folder called rc.d or rc.3 (or 5) or even something that starts with "init". Then, look inside that folder and you should find a script for the FTP daemon.


----------



## lensman3

Go to directory /etc/init.d (hopefully SUSE hasn't moved the SYS5 (pronounced "SYS FIVE") startup scripts). Do a "grep" for "ftp". Command is "grep ftp *". What ever file it reports for ftp then do: "./vsftpd restart". That should restart the ftp daemon. THIS ASSUMES THAT FTP STARTS AS A DAEMON!!!

It can also run from the "/etc/xinetd.d" directory. Go to this directory and see if there is a file called "vsftpd". If ftp runs out of this directory, it is actually more efficient. Ftp only will start when somebody tries to connect, instead of a daemon that always runs. My vsftpd file looks like :
service ftp
{
socket_type = stream
wait = no
user = root
server = /usr/sbin/vsftpd
server_args = /etc/vsftpd/vsftpd.conf
nice = 10
disable = no
flags = IPv4
}


You will have to turn "disable =" from yes to no to activate xinitd.d method and do a restart on /etc/init.d/xinitd". You will also have to delete the soft file links (ln -s) in /etc/rc3.d and /rc5.d run-level directories that start the ftp daemon. The softfile links actually point to the scripts in "/etc/init.d".

Any changes to /etc/init.d directory, you will have to do a restart on the "/etc/init.d/xinetd restart" daemon for it to see the changes. Look in "dmesg" and "/var/log/messages" for errors.


----------



## Skie

lensman3 said:


> Go to directory /etc/init.d (hopefully SUSE hasn't moved the SYS5 (pronounced "SYS FIVE") startup scripts). Do a "grep" for "ftp". Command is "grep ftp *". What ever file it reports for ftp then do: "./vsftpd restart". That should restart the ftp daemon. THIS ASSUMES THAT FTP STARTS AS A DAEMON!!!
> 
> It can also run from the "/etc/xinetd.d" directory. Go to this directory and see if there is a file called "vsftpd". If ftp runs out of this directory, it is actually more efficient. Ftp only will start when somebody tries to connect, instead of a daemon that always runs. My vsftpd file looks like :
> service ftp
> {
> socket_type = stream
> wait = no
> user = root
> server = /usr/sbin/vsftpd
> server_args = /etc/vsftpd/vsftpd.conf
> nice = 10
> disable = no
> flags = IPv4
> }
> 
> 
> You will have to turn "disable =" from yes to no to activate xinitd.d method and do a restart on /etc/init.d/xinitd". You will also have to delete the soft file links (ln -s) in /etc/rc3.d and /rc5.d run-level directories that start the ftp daemon. The softfile links actually point to the scripts in "/etc/init.d".
> 
> Any changes to /etc/init.d directory, you will have to do a restart on the "/etc/init.d/xinetd restart" daemon for it to see the changes. Look in "dmesg" and "/var/log/messages" for errors.


I don't recommend making these types of changes for a newer user of Linux since all it takes is one wrong mistake and they could cause some serious damage to their system.


----------



## lensman3

No. Only ftp will break nothing else. This technology has had 20 years to mature. It is pretty bullet proof. The "yum" install for vsftpd put both methods on my machine.


----------

