22 мая 2024, 11:23:20

Новости:

Чтобы использовать все возможности форума на смартфоне или планшете необходимо в браузере выбрать настройку "Версия для ПК".


avatar_gratis

FTP-сервер ProFTPD

Автор gratis, 10 марта 2006, 20:40:20

0 Пользователей и 1 гость просматривают эту тему.

Salagin

Duke
А пароль? Тут не useradd пользуешся, а прописываешь в файлах логин и пароль, созданный make_pass_[Для просмотра ссылки зарегистрируйтесь]
Если к власти не придут красно-коричневые, потому что им помешают зеленые, то власть захватят голубые.

Летят N самолетов, нет N мало -- К и оба реактивные...

gratis

14 марта 2006, 11:09:46 #31 Последнее редактирование: 14 марта 2006, 11:12:09 от gratis
Salagin
А что в нем одна функция?
Добавлено:
А мой хешированный пароль с форумской базы годится?  :D  
Узнай первым!!! о новых темах и ответах в Telegram канале:  @gratis_forum https://t.me/gratis_forum

Duke

Salagin
Непомню какой ФТП демон настраивл,но там ФТП пользоваться мог любой юзер входящий в группу ФТП.
и помойму тут достаточно создать группу и юзера в эту группу.
Хотя МБ я ошибаюсь....надо пробовать.

Salagin

gratis
ЦитироватьА что в нем одна функция?

Он только для этого и предназначен... для хеширования пароля
Давай посмотрю :lol:
Если к власти не придут красно-коричневые, потому что им помешают зеленые, то власть захватят голубые.

Летят N самолетов, нет N мало -- К и оба реактивные...

gratis

Salagin
ЦитироватьОн только для этого и предназначен... для хеширования пароля

У меня нет такого файла :aga:
Узнай первым!!! о новых темах и ответах в Telegram канале:  @gratis_forum https://t.me/gratis_forum

Salagin

gratis
ЦитироватьУ меня нет такого файла

Напеши...  :lol:
Вот

cat make_pass_ftp.pl
#!/usr/bin/perl
print "User password --> ";
$c=<>;
($u_ps)=split('\n',$c);
srand();
for($i=0;$i<2;++$i)
   {
   $k=int(rand(127));
   if($k < 32)
       {
       $k=$k+50;
       }
   $kc[$i]=chr($k);
   }
$kl=join("",$kc[0],$kc[1]);
$ps_c=crypt($u_ps,$kl);
print "$ps_c\n";

Запеши
Если к власти не придут красно-коричневые, потому что им помешают зеленые, то власть захватят голубые.

Летят N самолетов, нет N мало -- К и оба реактивные...

Duke

Ща настроил у себя ! всё работает !
Создаём группу ftp !
Создаём пользователя и загоняем его в группу ftp.
Всё ! Можно работать !


# Allow anonymous FTP?
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
di######sage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that turning on ascii_download_enable enables malicious remote parties
# to consume your I/O resources, by issuing the command "SIZE /big/file" in
# ASCII mode.
# These ASCII options are split into upload and download because you may wish
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
# on the client anyway..
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES

pam_service_name=vsftpd
userlist_enable=YES
#enable for standalone mode
listen=YES
tcp_wrappers=YES

По безопастности ничего не мутил. Так что нужно дорабатывать.

gratis

Нашел чем файлы делать но ничего пока не получается :smile11:

The ftpasswd program can create and update files for both AuthUserFile and AuthGroupFile. When it is used for the first time, the program will create the necessary file. If that file already exists, ftpasswd will update it with the new information.

ftpasswd must first know what type of file to create. Use either the --passwd option (for handling AuthUserFiles), or the --group option (for handling AuthGroupFiles); this is required.

When creating an AuthUserFile, the following options are also required: --name, --uid, --home, and --shell. This information is required by proftpd to authenticate a user. The optional parameters for an AuthUserFile include --gid (defaults to the given --uid argument when not provided) and --gecos (not used by proftpd at all). For example:

 ftpasswd --passwd --name=bob --uid=1001 --home=/home/bob --shell=/bin/false

creates an account for user bob. To create a file with a name or location other than the default (which, for --passwd mode is ftpd.passwd), use the --file option. For example, to create the alternate password file in /usr/local/etc/ftpd/passwd:
 ftpasswd --passwd --file=/usr/local/etc/ftpd/passwd --name=bob --uid=1001 --home=/home/bob \
   --shell=/bin/false

For AuthGroupFiles, use --group:

 ftpasswd --group --name=group-name --gid=group-id --member=user-member1  \
   --member=user-member2 ... --member=user-memberN

The most common change to these files is made to AuthUserFiles, to change a user's password. The --change-password option was provided just for this scenario:

 ftpasswd --passwd --name=user --change-password

Добавлено:
Duke
Что это? Конфиг у тебя совсем не такой.
Узнай первым!!! о новых темах и ответах в Telegram канале:  @gratis_forum https://t.me/gratis_forum

Duke

15 марта 2006, 02:03:53 #38 Последнее редактирование: 15 марта 2006, 02:04:22 от Duke
gratis
ЦитироватьЧто это? Конфиг у тебя совсем не такой
Возможно vsftpd поновее. Это в сборке red hat 9.
А ты мой конфиг не пробовал ? МОж прокатит  :D

Salagin

gratis
У тебя что валяеццо в etc директории proftpd?
Вот у меня
ls
group.admin.ftp  
make_pass_[Для просмотра ссылки зарегистрируйтесь]*  
passwd.ftp
group.ftp
passwd.admin.ftp  
proftpd.conf
Хотя, насколько я понял passwd.ftp и group.ftp содержат записи аналогичную записи в /etc/passwd и /etc/group для группы и пользователя ftp...
а вот в passwd.admin.ftp как раз и находяццо такие записи (логин, пароль, номер юзверя, номер группы, исходная папка, оболочка)
tv:_o5uGXTiPMq9s:2001:2000::/usr/local/apache/htdocs/TV:/bin/bash
в group.admin.ftp запись (типа группа виртуальная)
upload::2000:
К сожалению, не помню, как и что конкретно делал, но сейчас добавляю только логин и пароль в passwd.admin.ftp и все
У Дюка конфа для vsftpd

Добавлено:
Сорри, забыл кусок конфига, мы же виртуальных юзвере делаем поетому

<VirtualHost твой IP>
Port                            2021
AuthUserFile                    /etc/proftpd/passwd.admin.ftp
AuthGroupFile                   /etc/proftpd/group.admin.ftp
DefaultRoot                     ~
RootLogin                       on
Umask                           022 022
AllowOverwrite                  on
</VirtualHost>
Если к власти не придут красно-коричневые, потому что им помешают зеленые, то власть захватят голубые.

Летят N самолетов, нет N мало -- К и оба реактивные...



По всем вопросам пишите по адресу gratispp@mail.ru