PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : bei proftpd virtuelle user einrichten?



Raytheon
01.05.03, 21:52
Hallo!

Ich möchte bei proftpd virtuelle user einrichten die unabhängig von den lokalen Linux Usern sind.(bei Redhat 9.0 und SuSE 8.0)


http://www.linuxforen.de/forums/showthread.php?s=&threadid=76322&highlight=proftpd+user
Hab auch schon den Beitrag gelesen, und auch die Doku auf den div. proftpd Seiten, aber da ich mich mit Linux nicht so gut auskenne, sind die Dokus für mich noch recht kompliziert. Z.B. bei www.proftpd.org /de

Vielleicht kann ja jemand mal ein Bsp. posten wie man das macht!?


Danke schon mal im voraus.

George Mason
01.05.03, 22:19
Hier die entscheidenden Auszüge aus meiner proftpd.conf:

# Set the user and group that the server normally runs at.
User ftp
Group ftp

# Passwortfile setzen
AuthUserFile /etc/passwd_ftp

# Groupfile setzen
AuthGroupFile /etc/group_ftp

# Ich benutze aus Sicherheitsgründen nicht die echten /etc/group oder /etc/passwd

Raytheon
01.05.03, 22:57
Danke einmal

Aber wenn ich das ändere bekomme ich folgende Fehlermeldung:
- no such group 'ftp'
- Fatal: Group: Unknown group 'ftp'.



Und wie sieht das "passwd_ftp" und "group_ftp" file aus bzw was soll drinnen stehen, sorry bin noch Linux Anfänger.

George Mason
05.05.03, 09:44
als Vorlage kannst Du Deine /etc/group und /etc/passwd verwenden.

Die Gruppe ftp muss sich natürlich auf Deinem Rechner befinden, bzw. du trägst in die conf die Gruppe und den user ein, die/der normalerweise den proftpd startet.

Raytheon
06.05.03, 18:35
Ich hab leider noch ein Problem, ich kann mich dann mit dem user nicht einloggen!?

passwd_ftp:
ray:x:500:100:Ray Theon:/home/ray:/bin/bash

group_ftp:
nobody:x:65533:nobody,root
nogroup:x:65534:nobody,root
uucp:x:14:uucp,fax,root,fnet,ray


Die Gruppe "ftp" hab ich jetzt zu den normalen Linux Gruppen hinzugefügt.

George Mason
06.05.03, 22:02
OK bei mir sieht das so aus:

/etc/passwd_ftp

max:x:1004:1004::/var/ftp/pub:/bin/false
jack:x:1004:1004::/var/ftp/pub:/bin/false

Wobei ich /bin/false erst irgendwie aktiveren musste....

/etc/group_ftp

ftp:x:1002:max, jack, brian

allerdings steht bei mir anstelle des x ein verschlüsseltes Passwort.
Wenn Du probierst, Dich einzuloggen, wirst Du nach Benutzername und Passwort gefragt?

Sorry, ich weiss nicht woran es bei Dir liegt. Ich kann Dir höchstens mal meine komplette proftpd.conf posten, wenn Dir das was hilft. Mit dieser läuft der Server ja bei mir einwandfrei!

Ich guck nochmal, ob ich das How-To wieder finde!!

Raytheon
07.05.03, 11:59
allerdings steht bei mir anstelle des x ein verschlüsseltes Passwort.

Da krankt es bei mir, wie kann ich das Passwort verschlüsseln? Sollte wenn möglich über Linux funktionieren.

Wenn Du probierst, Dich einzuloggen, wirst Du nach Benutzername und Passwort gefragt?
Ja, aber ich hab das Passwort nicht verschlüsselt in die Datei "passwd_ftp" eingetragen, darum konnte ich mich wahrscheinlich auch nicht einloggen.

Ich kann Dir höchstens mal meine komplette proftpd.conf posten
Ist zwar nicht nötig aber ansehen würde ich sie schon mal gerne um zu sehen was ich besser konfigurieren könnte.

George Mason
08.05.03, 15:54
Es gibt ein Tool, mit dem Du eine passwd und eine groups-Datei erstellen kannst, es heißt ftpasswd!

http://www.castaglia.org/proftpd/contrib/ftpasswd.html

Raytheon
09.05.03, 19:32
Das Tool schaut recht nett aus, aber leider hats da was bei mir.


Bin mit root angemeldet.
Wenn ich z.B. folgendes eingebe:
./ftpasswd --passwd --name=ray --uid=1001 --home=/home/ray --shell=/bin/false

Bekomme ich folgende Fehlermeldung:
./ftpasswd: bad interpreter: Permission denied


Und wenn ich folgendes eingebe:
ftpasswd --passwd -name=ray --uid=1001 --home=/home/ray --shell=/bin/false

bekomme ich folgende Fehlermeldung:
bash: ftpasswd: command not found


Und ich hab leider auch noch nicht gecheckt wo man da sein passwort eingeben muss damit es das Programm verschlüsselt.

George Mason
11.05.03, 12:04
probiere mal, vorher in Dein Homeverzechnis zu wechseln (oder das von Root), und dann rufe ftpasswd mit seinem kompletten Pfad auf (bei mir /usr/sbin/ftpasswd). Ich vermute, das Tool möchte die Dateien in das aktuelle work directory schreiben.

Und was die Verschlüsselung betrifft: /usr/sbin/ftpasswd --help

Raytheon
11.05.03, 14:39
So nachdem ich jetzt auf den Fehler darauf gekommen bin, konnte ich jetzt das passwd und das group file erstellen.

Aber wenn ich mich jetzt auf den FTP anmelden will, kommt zwar die Benutzerabfrage aber ich kann mich nicht einloggen, er sagt immer, dass er sich nicht anmelden konnte und ich solls es nochmal probieren...

Ich poste jetzt auchmal mein proftpd.conf file:
# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName "ProFTPD Default Installation"
ServerType standalone
DefaultServer on

# Port 21 is the standard FTP port.
Port 21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances 30

# Set the user and group under which the server will run.
User ftp
Group ftp

AuthUserFile /etc/ftpd.passwd
AuthGroupFile /etc/ftpd.group

# Normally, we want files to be overwriteable.
#<Directory />
#AllowOverwrite on
#</Directory>

# A basic anonymous configuration, no upload directories.
#<Anonymous ~ftp>
# User ftp
# Group ftp

# We want clients to be able to login with "anonymous" as well as "ftp"
# UserAlias anonymous ftp

# Limit the maximum number of anonymous logins
# MaxClients 10

# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
# DisplayLogin welcome.msg
# DisplayFirstChdir .message

# Limit WRITE everywhere in the anonymous chroot
# <Limit WRITE>
# DenyAll
# </Limit>

#</Anonymous>
#<VirtualHost 192.168.0.9>
#</VirtualHost>
#<Anonymous ~ftp>
# User ftp
# Group ftp

#<Directory *>
#<Limit WRITE>
# DenyAll
#</Limit>
#</Directory>
#</Anonymous>