70.5. ProFTPD + MySQL / OpenLDAP 用户认证

本文详细介绍了ProFTPD服务器的安装过程与配置方法,包括使用MySQL和OpenLDAP进行用户认证的具体步骤。通过图文并茂的方式,帮助读者快速掌握ProFTPD的部署与管理。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

准备工作

下载ProFTPD : ftp://ftp.proftpd.org/distrib/source/proftpd-1.2.7.tar.gz

下载 mod_sql : http://www.lastditcheffort.org/~aah/proftpd/mod_sql/

下载mod_ldap-2.8.10 : http://www.horde.net/~jwm/software/mod_ldap/

70.5.1. Proftpd + MySQL

tar xvzf proftpd-version.tar.gz

cd proftpd-version

./configure --prefix=/usr/local/proftpd --with-modules=mod_sql:mod_sql_mysql

make

make install
			
安装成功后,测试ProFTPD,启动ProFTPD

/usr/local/proftpd/sbin/in.proftpd

如果没有显示任何信息,ProFTPD启动成功。使用系统用户登录Ftp Server

[root@linux sbin]# ftp localhost

Connected to localhost (127.0.0.1).

220 ProFTPD 1.2.7 Server (ProFTPD Default Installation) [linux.xuser.net]

Name (localhost:root):usera

331 Password required for usera.

Password:

230 User usera logged in.

Remote system type is UNIX.

Using binary mode to transfer files.

ftp>

ProFTPD测试成功,关闭ProFTPD

killall in.proftpd



编辑proftpd.conf文件

vi /usr/local/proftpd/etc/proftpd.conf

添加下面几行参数

<Global>

SQLConnectInfo ftpusers@localhost:3306 root chen

SQLAuthTypes Plaintext

SQLUserInfo users userid passwd uid gid homedir NULL

RequireValidShell off

SQLAuthenticate users groups usersetfast groupsetfast

</Global>



格式说明:

SQLConnectInfo 数据库@主机名:端口 用户 密码

SQLAuthTypes 密码类型(Plaintext明文密码,Crypt DES密码,Backend MySQL password()函数产生的密码)

SQLUserInfo [用户表] [用户名字段] [密码字段] [用户ID] [组ID] [用户目录] NULL



创建ftpusers.sql文件

[mysql@linux mysql]$ vi ftpusers.sql

-- MySQL dump 8.22

--

-- Host: localhost    Database: proftpd

---------------------------------------------------------

-- Server version       3.23.52-max



--

-- Table structure for table 'groups'

--



CREATE TABLE groups (

  groupname varchar(255) binary NOT NULL default '',

  gid int(11) NOT NULL default '0',

  members text NOT NULL,

  PRIMARY KEY  (groupname)

) TYPE=MyISAM;



--

-- Dumping data for table 'groups'

--





INSERT INTO groups VALUES ('nogroup',502,'FTP Group');



--

-- Table structure for table 'users'

--



CREATE TABLE users (

  userid varchar(255) binary NOT NULL default '',

  passwd varchar(255) binary NOT NULL default '',

  uid int(11) default NULL,

  gid int(11) default NULL,

  homedir varchar(255) default NULL,

  shell varchar(255) default NULL,

  count int(11) default NULL,

  used double(10,1) default '0.0',

  quota double(10,1) default '10000000.0',

  PRIMARY KEY  (userid)

) TYPE=MyISAM;



--

-- Dumping data for table 'users'

--





INSERT INTO users VALUES ('chen','chen',500,500,'/home/samba','/bin/sh',0,0.0,10000000.0);

INSERT INTO users VALUES ('user2','123456',500,500,'/home/samba','/bin/bash',1,0.0,10000000.0);

INSERT INTO users VALUES ('user1','123456',NULL,NULL,'/u01',NULL,1,0.0,10000000.0);



创建数据库与表

[mysql@linux mysql]$ echo "create database ftpusers" | mysql -uroot -pchen

[mysql@linux mysql]$ mysql -uroot -pchen ftpusers < ftpusers.sql

[mysql@linux mysql]$



再次启动ProFTPD

/usr/local/proftpd/sbin/in.proftpd

这次使用MySQL用户登录Ftp Server

显示230 User xxxxx logged in. MySQL认证成功

			

70.5.2. Proftpd + OpenLDAP

tar xvzf proftpd-version.tar.gz

cd proftpd-version

./configure --prefix=/usr/local/proftpd --with-modules=mod_ldap

make

make install



# tar zxvf mod_ldap-2.8.10.tar.gz



将mod_ldap-2.8.10目录下的posixAccount-objectclass和posixGroup-objectclass

复制到OpenLDAP 的schema目录下:



# cp mod_ldap-2.8.10/posix* /etc/openldap/schema/

# vi /etc/openldap/slapd.conf

修改OpenLDAP的配置文件slapd.conf,将这两个文件包含到该文件中:

include /etc/openldap/schema/posixAccount-objectclass

include /etc/openldap/schema/posixGroup-objectclass

重新启动OpenLDAP:

# service ldap restart

Stopping slapd:                                            [  OK  ]

Starting slapd:                                            [  OK  ]



编辑proftpd.conf文件

vi /usr/local/proftpd/etc/proftpd.conf

添加下面几行参数



<Global>

LDAPServer localhost
LDAPDNInfo cn=your-dn,dc=horde,dc=net dnpass
LDAPDoAuth on "dc=users,dc=horde,dc=net"

</Global>



格式说明:

LDAPServer OpenLDAP服务器
LDAPDNInfo cn=你的-dn,dc=区域名,dc=区域名 dn密码
LDAPDoAuth on "dc=区域名,dc=区域名"

例子:

       <Global>

LDAPServer localhost

LDAPDNInfo cn=manager,dc=xuser,dc=net secret

LDAPDoAuth on dc=xuser,dc=net

</Global>



根据自己需要修改mod_ldap-2.8.10目录中的group-ldif和user-ldif文件,并将条目添加到OpenLDAP中:



# ldapadd -x -D "cn=manager,dc=xuser,dc=net" -w secret -f group-ldif

# ldapadd -x -D "cn=manager,dc=xuser,dc=net" -w secret -f user-ldif



显示:adding new entry "cn=mygroup, dc=xuser, dc=net" 添加成功

使用ldapsearch查看记录

# ldapsearch -x -b "dc=xuser,dc=net"



启动ProFTPD:

/usr/local/proftpd/sbin/in.proftpd

使用OpenLDAP用户登录Ftp Server

显示230 User xxxxx logged in. OpenLDAP认证成功



例:

[root@linux mod_ldap-2.8.10]# cat group-ldif

dn: cn=mygroup, dc=xuser, dc=net

objectclass: posixGroup

cn: mygroup

gidNumber: 100

memberUid: user1

memberUid: user2

memberUid: user3

memberUid: user4

memberUid: ftpusersb

memberUid: usera

memberUid: jwm

memberUid: 100

[root@linux mod_ldap-2.8.10]# cat user-ldif

dn: uid=jwm, dc=xuser, dc=net

objectclass: posixAccount

cn: John Morrissey

uid: jwm

uidNumber: 2000

gidNumber: 100

homeDirectory: /home/chen

userPassword: {crypt}*

loginShell: /bin/bash



dn: uid=chen, dc=xuser, dc=net

objectclass: posixAccount

cn: chen

uid: chen

uidNumber: 2000

gidNumber: 100

homeDirectory: /home/chen

userPassword: {crypt}sa7XjjlytXZZ2

loginShell: /bin/bash



dn: cn=ftpuser1, dc=xuser, dc=net

objectclass: posixAccount

cn: ftpuser1

uid: ftpuser1

uidNumber: 2000

gidNumber: 100

homeDirectory: /home/chen

userPassword: {crypt}sa7XjjlytXZZ2

loginShell: /bin/bash



dn: uid=usera, dc=xuser, dc=net

objectclass: posixAccount

cn: usera

uid: usera

uidNumber: 2000

gidNumber: 100

homeDirectory: /tmp

userPassword:{crypt}sa7XjjlytXZZ2

loginShell: /bin/bash



dn: uid=ftpuserb, dc=xuser, dc=net

objectclass: posixAccount

cn: ftpuserb

uid: ftpuserb

uidNumber: 2000

gidNumber: 100

homeDirectory: /tmp

userPassword:{crypt}O2BooHEK9JI06

loginShell: /bin/bash



上面的用户密码是用crypt方式加密的密码,密码产生请看

使用PHP产生:

# cat des.php

<html>

<p>DES 密碼產生器</p>

<form method=post action=des.php>

<p>password:<input name=passwd type=text size=20></p>

<input type=submit value=submit>

</form>

<?

$enpw=crypt($passwd);

echo "password is: $enpw";

?>

使用perl产生:

perl -e 'print("userPassword: ".crypt("secret","salt")."\n");'

产生的DES密码,同样也可以用于OpenLDAP的管理员密码

# vi /etc/openldap/slapd.conf

rootpw                {crypt}ijFYNcSNctBYg

四、 标准的配置文件

MySQL认证配置实例

[root@linux root]# cat /usr/local/proftpd/etc/proftpd.conf

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



# We put our mod_sql directives in a <Global> block so they'll be

# inherited by the <Anonymous> block below, and any other <VirtualHost>

# blocks we may want to add.  For a simple server these don't need to

# be in a <Global> block but it won't hurt anything.

<Global>

SQLConnectInfo ftpusers@localhost:3306 root chen

SQLAuthTypes Plaintext

SQLUserInfo users userid passwd uid gid homedir NULL

RequireValidShell off

SQLAuthenticate users groups usersetfast groupsetfast

</Global>

# 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 normal user and group permissions for the server.

User                            nobody

Group                           nogroup



# Normally, we want files to be overwriteable.

<Directory /*>

  AllowOverwrite                on

</Directory>



# A basic anonymous configuration, no upload directories.  If you

# don't want to support anonymous access, simply remove this

# <Anonymous ..> ... </Anonymous> block.



<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>



OpenLDAP认证配置实例

[root@linux root]# cat /usr/local/proftpd/etc/proftpd.conf



# 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



<Global>



LDAPDoAuth on dc=xuser,dc=net

LDAPServer localhost

LDAPDNInfo cn=manager,dc=xuser,dc=net secret



</Global>



# 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                            nobody

Group                           nogroup







# 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>

# Include /usr/local/etc/mod_ldap.conf



OpenLDAP 配置文件

[root@linux root]# cat /etc/openldap/slapd.conf

# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.6 2001/04/20 23:32:43 kurt Exp $

#

# See slapd.conf(5) for details on configuration options.

# This file should NOT be world readable.

#

include         /etc/openldap/schema/core.schema

include         /etc/openldap/schema/cosine.schema

include         /etc/openldap/schema/inetorgperson.schema

include         /etc/openldap/schema/nis.schema

include         /etc/openldap/schema/redhat/rfc822-MailMember.schema

include         /etc/openldap/schema/redhat/autofs.schema

include         /etc/openldap/schema/redhat/kerberosobject.schema

include         /etc/openldap/schema/chen

include         /etc/openldap/schema/posixAccount-objectclass

include         /etc/openldap/schema/posixGroup-objectclass

#include                /etc/openldap/schema/qmail_schema

#include        /etc/openldap/slapd.info.oc.conf

#include        /etc/openldap/slapd.account.oc.conf



# Define global ACLs to disable default read access.



# Do not enable referrals until AFTER you have a working directory

# service AND an understanding of referrals.

#referral       ldap://root.openldap.org



#pidfile        //var/run/slapd.pid

#argsfile       //var/run/slapd.args



# Create a replication log in /var/lib/ldap for use by slurpd.

#replogfile     /var/lib/ldap/master-slapd.replog



# Load dynamic backend modules:

# modulepath    /usr/sbin/openldap

# moduleload    back_ldap.la

# moduleload    back_ldbm.la

# moduleload    back_passwd.la

# moduleload    back_shell.la



# The next two lines allow use of TLS for connections using a dummy test

# certificate, but you should generate a proper certificate by changing to

# /usr/share/ssl/certs, running "make slapd.pem", and fixing permissions on

# slapd.pem so that the ldap user or group can read it.

#TLSCertificateFile /usr/share/ssl/certs/slapd.pem

#TLSCertificateKeyFile /usr/share/ssl/certs/slapd.pem



#######################################################################

# ldbm database definitions

#######################################################################



database        ldbm

suffix          "dc=xuser,dc=net"

rootdn          "cn=Manager,dc=xuser,dc=net"

#rootdn         "cn=Manager,dc=my-domain,dc=com"

#rootdn         "cn=Manager,o=My Organization Name,c=US"

# Cleartext passwords, especially for the rootdn, should

# be avoided.  See slappasswd(8) and slapd.conf(5) for details.

# Use of strong authentication encouraged.

rootpw          secret

# rootpw                secret

# rootpw                {crypt}ijFYNcSNctBYg

# The database directory MUST exist prior to running slapd AND

# should only be accessible by the slapd/tools. Mode 700 recommended.

directory       /var/lib/ldap

# Indices to maintain

index   objectClass,uid,uidNumber,gidNumber,memberUid   eq

index   cn,mail,surname,givenname                       eq,subinitial

# Replicas to which we should propagate changes

#replica ldap-1.example.com:389 tls=yes

#       bindmethod=sasl saslmech=GSSAPI

#       authcId=host/ldap-master.example.com@EXAMPLE.COM



五、 FAQ
Q:在本地ftp localhost输入用户名、密码回车后。等很久才进入FTP Server

A:ftp 127.0.0.1



Q:在远程服务器上ftp ip输入用户名、密码回车后。等很久才进入FTP Server

A:LDAPServer localhost 改为 LDAPServer 127.0.0.1



Q:[root@linux mod_ldap-2.8.10]# ftp 127.0.0.1

Connected to 127.0.0.1 (127.0.0.1).

500 FTP server shut down (going down at Tue Dec 17 19:00:00 2002) -- please try again later.

ftp>

A:rm –rf /etc/shutmsg

Q:登录Ftp Server 提示

530 Login incorrect.

Login failed.
我确认输入的用户、密码决对正确

A:在登录ProFTPD时加参数proftpd –d5 –n会输出调试信息。你可以在其中

找到答案。如果在调试信息中找到这一行no such user 'xxxx'
可能是与MySQL/OpenLDAP连接有问题。

Q:我在网上看见很多介绍如何安装ProFTPD文章,阅读大量的How to,按How to一步一步做,从来没有安装成功过。

A:网上很多文章,比较老,很多定义现以不在使用如:

SQLConnectInfo laftp@localhost 用户名 口令

SQLAuthTypes Plaintext Backend

SQLAuthoritative ON

SQLDefaultGID 1001

SQLDefaultUID 1001

SQLDoAuth ON

SQLDoGroupAuth ON

SQLGidField gid

SQLGroupGIDField gid

SQLGroupMembersField members

SQLGroupTable ftpgroup

SQLGroupnameField groupname

SQLHomedirField homedir

SQLMinUserUID 400

SQLMinUserGID 400

SQLPasswordField passwd

SQLUidField uid

SQLUserTable ftpuser

SQLUsernameField userid

SQLLoginCountField count

########################################################

LDAPServer                      "localhost"

LDAPPrefix                      "dc=horde,dc=net"

LDAPDN                          "cn=thedn,dc=horde,dc=net"

LDAPDNPass                      "ldap_dnpass"

LDAPNegativeCache       on



			




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

CPU 信息 : hisilicon,hi3798mv300@4核处理器 | aarch64架构 系统版本 : Ubuntu 20.04.6 LTS | V20250201-4.4.35_ecoo_83032968-64 可用存储 : 61.6% 4119.0M 可用内存 : 68.5% 1275.0M | 交换区:nan% 0.0M 警告,您的系统似乎出现问题,强烈建议重置 recoverbackup ! 启动时间 : 2 天 23 小时 58 分钟 52 秒 IP 地址 : 192.168.68.142 设备温度 : 57°C MAC 地址 : 00:11:22:33:44:55 设备识别码:25a8164713804c48599885640e2d8ff9 root@hi3798mv300:~# # 在海纳思系统安装必备工具 root@hi3798mv300:~# sudo apt install cec-utils pulseaudio avahi-daemon Reading package lists... Done Building dependency tree Reading state information... Done avahi-daemon is already the newest version (0.7-4ubuntu7.3). avahi-daemon set to manually installed. The following additional packages will be installed: gstreamer1.0-plugins-base libasound2-plugins libasyncns0 libcairo2 libcdparanoia0 libcec4 libflac8 libgomp1 libgstreamer-plugins-base1.0-0 libice6 libjack-jackd2-0 libjson-glib-1.0-0 libjson-glib-1.0-common libopus0 liborc-0.4-0 libp8-platform2 libpixman-1-0 libpulse0 libpulsedsp libsamplerate0 libsm6 libsnapd-glib1 libsndfile1 libsoxr0 libspeexdsp1 libtheora0 libvisual-0.4-0 libvorbisenc2 libwebrtc-audio-processing1 libx11-xcb1 libxcb-render0 libxcb-shm0 libxrandr2 libxrender1 libxtst6 pulseaudio-utils rtkit x11-common Suggested packages: gvfs libvisual-0.4-plugins jackd2 opus-tools snapd pavumeter pavucontrol paman paprefs ubuntu-sounds The following NEW packages will be installed: cec-utils gstreamer1.0-plugins-base libasound2-plugins libasyncns0 libcairo2 libcdparanoia0 libcec4 libflac8 libgomp1 libgstreamer-plugins-base1.0-0 libice6 libjack-jackd2-0 libjson-glib-1.0-0 libjson-glib-1.0-common libopus0 liborc-0.4-0 libp8-platform2 libpixman-1-0 libpulse0 libpulsedsp libsamplerate0 libsm6 libsnapd-glib1 libsndfile1 libsoxr0 libspeexdsp1 libtheora0 libvisual-0.4-0 libvorbisenc2 libwebrtc-audio-processing1 libx11-xcb1 libxcb-render0 libxcb-shm0 libxrandr2 libxrender1 libxtst6 pulseaudio pulseaudio-utils rtkit x11-common 0 upgraded, 40 newly installed, 0 to remove and 0 not upgraded. Need to get 6,056 kB of archives. After this operation, 22.5 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://repo.huaweicloud.com/ubuntu-ports focal-updates/main arm64 liborc-0.4-0 arm64 1:0.4.31-1ubuntu0.1 [172 kB] Get:2 http://repo.huaweicloud.com/ubuntu-ports focal-updates/main arm64 libgstreamer-plugins-base1.0-0 arm64 1.16.3-0ubuntu1.4 [665 kB] Get:3 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 x11-common all 1:7.7+19ubuntu14 [22.3 kB] Get:4 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libice6 arm64 2:1.0.10-0ubuntu1 [37.7 kB] Get:5 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libasyncns0 arm64 0.8-6 [10.9 kB] Get:6 http://repo.huaweicloud.com/ubuntu-ports focal-updates/main arm64 libflac8 arm64 1.3.3-1ubuntu0.2 [85.8 kB] Get:7 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libvorbisenc2 arm64 1.3.6-2ubuntu1 [70.5 kB] Get:8 http://repo.huaweicloud.com/ubuntu-ports focal-updates/main arm64 libsndfile1 arm64 1.0.28-7ubuntu0.3 [163 kB] Get:9 http://repo.huaweicloud.com/ubuntu-ports focal-updates/main arm64 libpulse0 arm64 1:13.99.1-1ubuntu3.13 [222 kB] Get:10 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libsm6 arm64 2:1.2.3-1 [15.1 kB] Get:11 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libjson-glib-1.0-common all 1.4.4-2ubuntu2 [3,468 B] Get:12 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libjson-glib-1.0-0 arm64 1.4.4-2ubuntu2 [54.0 kB] Get:13 http://repo.huaweicloud.com/ubuntu-ports focal-updates/main arm64 libsnapd-glib1 arm64 1.58-0ubuntu0.20.04.0 [82.7 kB] Get:14 http://repo.huaweicloud.com/ubuntu-ports focal-updates/main arm64 libgomp1 arm64 10.5.0-1ubuntu1~20.04 [93.5 kB] Get:15 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libsoxr0 arm64 0.1.3-2build1 [54.3 kB] Get:16 http://repo.huaweicloud.com/ubuntu-ports focal-updates/main arm64 libspeexdsp1 arm64 1.2~rc1.2-1.1ubuntu1.20.04.1 [34.7 kB] Get:17 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libwebrtc-audio-processing1 arm64 0.3.1-0ubuntu3 [245 kB] Get:18 http://repo.huaweicloud.com/ubuntu-ports focal-updates/main arm64 libx11-xcb1 arm64 2:1.6.9-2ubuntu1.6 [9,468 B] Get:19 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libxtst6 arm64 2:1.2.3-1 [11.7 kB] Get:20 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libsamplerate0 arm64 0.1.9-2 [931 kB] Get:21 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libjack-jackd2-0 arm64 1.9.12~dfsg-2ubuntu2 [248 kB] Get:22 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libasound2-plugins arm64 1.2.2-1ubuntu1 [61.7 kB] Get:23 http://repo.huaweicloud.com/ubuntu-ports focal-updates/main arm64 libpulsedsp arm64 1:13.99.1-1ubuntu3.13 [20.0 kB] Get:24 http://repo.huaweicloud.com/ubuntu-ports focal-updates/main arm64 pulseaudio-utils arm64 1:13.99.1-1ubuntu3.13 [51.8 kB] Get:25 http://repo.huaweicloud.com/ubuntu-ports focal-updates/main arm64 pulseaudio arm64 1:13.99.1-1ubuntu3.13 [690 kB] Get:26 http://repo.huaweicloud.com/ubuntu-ports focal/universe arm64 libp8-platform2 arm64 2.1.0.1+dfsg1-3build1 [20.3 kB] Get:27 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libxrender1 arm64 1:0.9.10-1 [16.1 kB] Get:28 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libxrandr2 arm64 2:1.5.2-0ubuntu1 [17.7 kB] Get:29 http://repo.huaweicloud.com/ubuntu-ports focal/universe arm64 libcec4 arm64 4.0.4+dfsg1-4ubuntu3 [196 kB] Get:30 http://repo.huaweicloud.com/ubuntu-ports focal/universe arm64 cec-utils arm64 4.0.4+dfsg1-4ubuntu3 [30.6 kB] Get:31 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libcdparanoia0 arm64 3.10.2+debian-13 [39.9 kB] Get:32 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libopus0 arm64 1.3.1-0ubuntu1 [172 kB] Get:33 http://repo.huaweicloud.com/ubuntu-ports focal-updates/main arm64 libpixman-1-0 arm64 0.38.4-0ubuntu2.1 [130 kB] Get:34 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libxcb-render0 arm64 1.14-2 [14.7 kB] Get:35 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libxcb-shm0 arm64 1.14-2 [5,560 B] Get:36 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libcairo2 arm64 1.16.0-4ubuntu1 [538 kB] Get:37 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libtheora0 arm64 1.1.1+dfsg.1-15ubuntu2 [154 kB] Get:38 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 libvisual-0.4-0 arm64 0.4.0-17 [91.3 kB] Get:39 http://repo.huaweicloud.com/ubuntu-ports focal-updates/main arm64 gstreamer1.0-plugins-base arm64 1.16.3-0ubuntu1.4 [542 kB] Get:40 http://repo.huaweicloud.com/ubuntu-ports focal/main arm64 rtkit arm64 0.12-4 [32.4 kB] Fetched 6,056 kB in 2s (2,752 kB/s) Extracting templates from packages: 100% Selecting previously unselected package liborc-0.4-0:arm64. (Reading database ... 28335 files and directories currently installed.) Preparing to unpack .../00-liborc-0.4-0_1%3a0.4.31-1ubuntu0.1_arm64.deb ... Unpacking liborc-0.4-0:arm64 (1:0.4.31-1ubuntu0.1) ... Selecting previously unselected package libgstreamer-plugins-base1.0-0:arm64. Preparing to unpack .../01-libgstreamer-plugins-base1.0-0_1.16.3-0ubuntu1.4_arm64.deb ... Unpacking libgstreamer-plugins-base1.0-0:arm64 (1.16.3-0ubuntu1.4) ... Selecting previously unselected package x11-common. Preparing to unpack .../02-x11-common_1%3a7.7+19ubuntu14_all.deb ... dpkg-query: no packages found matching nux-tools Unpacking x11-common (1:7.7+19ubuntu14) ... Selecting previously unselected package libice6:arm64. Preparing to unpack .../03-libice6_2%3a1.0.10-0ubuntu1_arm64.deb ... Unpacking libice6:arm64 (2:1.0.10-0ubuntu1) ... Selecting previously unselected package libasyncns0:arm64. Preparing to unpack .../04-libasyncns0_0.8-6_arm64.deb ... Unpacking libasyncns0:arm64 (0.8-6) ... Selecting previously unselected package libflac8:arm64. Preparing to unpack .../05-libflac8_1.3.3-1ubuntu0.2_arm64.deb ... Unpacking libflac8:arm64 (1.3.3-1ubuntu0.2) ... Selecting previously unselected package libvorbisenc2:arm64. Preparing to unpack .../06-libvorbisenc2_1.3.6-2ubuntu1_arm64.deb ... Unpacking libvorbisenc2:arm64 (1.3.6-2ubuntu1) ... Selecting previously unselected package libsndfile1:arm64. Preparing to unpack .../07-libsndfile1_1.0.28-7ubuntu0.3_arm64.deb ... Unpacking libsndfile1:arm64 (1.0.28-7ubuntu0.3) ... Selecting previously unselected package libpulse0:arm64. Preparing to unpack .../08-libpulse0_1%3a13.99.1-1ubuntu3.13_arm64.deb ... Unpacking libpulse0:arm64 (1:13.99.1-1ubuntu3.13) ... Selecting previously unselected package libsm6:arm64. Preparing to unpack .../09-libsm6_2%3a1.2.3-1_arm64.deb ... Unpacking libsm6:arm64 (2:1.2.3-1) ... Selecting previously unselected package libjson-glib-1.0-common. Preparing to unpack .../10-libjson-glib-1.0-common_1.4.4-2ubuntu2_all.deb ... Unpacking libjson-glib-1.0-common (1.4.4-2ubuntu2) ... Selecting previously unselected package libjson-glib-1.0-0:arm64. Preparing to unpack .../11-libjson-glib-1.0-0_1.4.4-2ubuntu2_arm64.deb ... Unpacking libjson-glib-1.0-0:arm64 (1.4.4-2ubuntu2) ... Selecting previously unselected package libsnapd-glib1:arm64. Preparing to unpack .../12-libsnapd-glib1_1.58-0ubuntu0.20.04.0_arm64.deb ... Unpacking libsnapd-glib1:arm64 (1.58-0ubuntu0.20.04.0) ... Selecting previously unselected package libgomp1:arm64. Preparing to unpack .../13-libgomp1_10.5.0-1ubuntu1~20.04_arm64.deb ... Unpacking libgomp1:arm64 (10.5.0-1ubuntu1~20.04) ... Selecting previously unselected package libsoxr0:arm64. Preparing to unpack .../14-libsoxr0_0.1.3-2build1_arm64.deb ... Unpacking libsoxr0:arm64 (0.1.3-2build1) ... Selecting previously unselected package libspeexdsp1:arm64. Preparing to unpack .../15-libspeexdsp1_1.2~rc1.2-1.1ubuntu1.20.04.1_arm64.deb ... Unpacking libspeexdsp1:arm64 (1.2~rc1.2-1.1ubuntu1.20.04.1) ... Selecting previously unselected package libwebrtc-audio-processing1:arm64. Preparing to unpack .../16-libwebrtc-audio-processing1_0.3.1-0ubuntu3_arm64.deb ... Unpacking libwebrtc-audio-processing1:arm64 (0.3.1-0ubuntu3) ... Selecting previously unselected package libx11-xcb1:arm64. Preparing to unpack .../17-libx11-xcb1_2%3a1.6.9-2ubuntu1.6_arm64.deb ... Unpacking libx11-xcb1:arm64 (2:1.6.9-2ubuntu1.6) ... Selecting previously unselected package libxtst6:arm64. Preparing to unpack .../18-libxtst6_2%3a1.2.3-1_arm64.deb ... Unpacking libxtst6:arm64 (2:1.2.3-1) ... Selecting previously unselected package libsamplerate0:arm64. Preparing to unpack .../19-libsamplerate0_0.1.9-2_arm64.deb ... Unpacking libsamplerate0:arm64 (0.1.9-2) ... Selecting previously unselected package libjack-jackd2-0:arm64. Preparing to unpack .../20-libjack-jackd2-0_1.9.12~dfsg-2ubuntu2_arm64.deb ... Unpacking libjack-jackd2-0:arm64 (1.9.12~dfsg-2ubuntu2) ... Selecting previously unselected package libasound2-plugins:arm64. Preparing to unpack .../21-libasound2-plugins_1.2.2-1ubuntu1_arm64.deb ... Unpacking libasound2-plugins:arm64 (1.2.2-1ubuntu1) ... Selecting previously unselected package libpulsedsp:arm64. Preparing to unpack .../22-libpulsedsp_1%3a13.99.1-1ubuntu3.13_arm64.deb ... Unpacking libpulsedsp:arm64 (1:13.99.1-1ubuntu3.13) ... Selecting previously unselected package pulseaudio-utils. Preparing to unpack .../23-pulseaudio-utils_1%3a13.99.1-1ubuntu3.13_arm64.deb ... Unpacking pulseaudio-utils (1:13.99.1-1ubuntu3.13) ... Selecting previously unselected package pulseaudio. Preparing to unpack .../24-pulseaudio_1%3a13.99.1-1ubuntu3.13_arm64.deb ... Unpacking pulseaudio (1:13.99.1-1ubuntu3.13) ... Selecting previously unselected package libp8-platform2:arm64. Preparing to unpack .../25-libp8-platform2_2.1.0.1+dfsg1-3build1_arm64.deb ... Unpacking libp8-platform2:arm64 (2.1.0.1+dfsg1-3build1) ... Selecting previously unselected package libxrender1:arm64. Preparing to unpack .../26-libxrender1_1%3a0.9.10-1_arm64.deb ... Unpacking libxrender1:arm64 (1:0.9.10-1) ... Selecting previously unselected package libxrandr2:arm64. Preparing to unpack .../27-libxrandr2_2%3a1.5.2-0ubuntu1_arm64.deb ... Unpacking libxrandr2:arm64 (2:1.5.2-0ubuntu1) ... Selecting previously unselected package libcec4:arm64. Preparing to unpack .../28-libcec4_4.0.4+dfsg1-4ubuntu3_arm64.deb ... Unpacking libcec4:arm64 (4.0.4+dfsg1-4ubuntu3) ... Selecting previously unselected package cec-utils. Preparing to unpack .../29-cec-utils_4.0.4+dfsg1-4ubuntu3_arm64.deb ... Unpacking cec-utils (4.0.4+dfsg1-4ubuntu3) ... Selecting previously unselected package libcdparanoia0:arm64. Preparing to unpack .../30-libcdparanoia0_3.10.2+debian-13_arm64.deb ... Unpacking libcdparanoia0:arm64 (3.10.2+debian-13) ... Selecting previously unselected package libopus0:arm64. Preparing to unpack .../31-libopus0_1.3.1-0ubuntu1_arm64.deb ... Unpacking libopus0:arm64 (1.3.1-0ubuntu1) ... Selecting previously unselected package libpixman-1-0:arm64. Preparing to unpack .../32-libpixman-1-0_0.38.4-0ubuntu2.1_arm64.deb ... Unpacking libpixman-1-0:arm64 (0.38.4-0ubuntu2.1) ... Selecting previously unselected package libxcb-render0:arm64. Preparing to unpack .../33-libxcb-render0_1.14-2_arm64.deb ... Unpacking libxcb-render0:arm64 (1.14-2) ... Selecting previously unselected package libxcb-shm0:arm64. Preparing to unpack .../34-libxcb-shm0_1.14-2_arm64.deb ... Unpacking libxcb-shm0:arm64 (1.14-2) ... Selecting previously unselected package libcairo2:arm64. Preparing to unpack .../35-libcairo2_1.16.0-4ubuntu1_arm64.deb ... Unpacking libcairo2:arm64 (1.16.0-4ubuntu1) ... Selecting previously unselected package libtheora0:arm64. Preparing to unpack .../36-libtheora0_1.1.1+dfsg.1-15ubuntu2_arm64.deb ... Unpacking libtheora0:arm64 (1.1.1+dfsg.1-15ubuntu2) ... Selecting previously unselected package libvisual-0.4-0:arm64. Preparing to unpack .../37-libvisual-0.4-0_0.4.0-17_arm64.deb ... Unpacking libvisual-0.4-0:arm64 (0.4.0-17) ... Selecting previously unselected package gstreamer1.0-plugins-base:arm64. Preparing to unpack .../38-gstreamer1.0-plugins-base_1.16.3-0ubuntu1.4_arm64.deb ... Unpacking gstreamer1.0-plugins-base:arm64 (1.16.3-0ubuntu1.4) ... Selecting previously unselected package rtkit. Preparing to unpack .../39-rtkit_0.12-4_arm64.deb ... Unpacking rtkit (0.12-4) ... Setting up libpixman-1-0:arm64 (0.38.4-0ubuntu2.1) ... Setting up libcdparanoia0:arm64 (3.10.2+debian-13) ... Setting up libx11-xcb1:arm64 (2:1.6.9-2ubuntu1.6) ... Setting up rtkit (0.12-4) ... Setting up libxrender1:arm64 (1:0.9.10-1) ... Setting up libvisual-0.4-0:arm64 (0.4.0-17) ... Setting up libxcb-render0:arm64 (1.14-2) ... Setting up x11-common (1:7.7+19ubuntu14) ... update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults Setting up libwebrtc-audio-processing1:arm64 (0.3.1-0ubuntu3) ... Setting up libxcb-shm0:arm64 (1.14-2) ... Setting up libgomp1:arm64 (10.5.0-1ubuntu1~20.04) ... Setting up libcairo2:arm64 (1.16.0-4ubuntu1) ... Setting up libflac8:arm64 (1.3.3-1ubuntu0.2) ... Setting up libp8-platform2:arm64 (2.1.0.1+dfsg1-3build1) ... Setting up libopus0:arm64 (1.3.1-0ubuntu1) ... Setting up libxrandr2:arm64 (2:1.5.2-0ubuntu1) ... Setting up liborc-0.4-0:arm64 (1:0.4.31-1ubuntu0.1) ... Setting up libasyncns0:arm64 (0.8-6) ... Setting up libtheora0:arm64 (1.1.1+dfsg.1-15ubuntu2) ... Setting up libspeexdsp1:arm64 (1.2~rc1.2-1.1ubuntu1.20.04.1) ... Setting up libjson-glib-1.0-common (1.4.4-2ubuntu2) ... Setting up libsamplerate0:arm64 (0.1.9-2) ... Setting up libvorbisenc2:arm64 (1.3.6-2ubuntu1) ... Setting up libice6:arm64 (2:1.0.10-0ubuntu1) ... Setting up libsoxr0:arm64 (0.1.3-2build1) ... Setting up libxtst6:arm64 (2:1.2.3-1) ... Setting up libgstreamer-plugins-base1.0-0:arm64 (1.16.3-0ubuntu1.4) ... Setting up libjson-glib-1.0-0:arm64 (1.4.4-2ubuntu2) ... Setting up gstreamer1.0-plugins-base:arm64 (1.16.3-0ubuntu1.4) ... Setting up libcec4:arm64 (4.0.4+dfsg1-4ubuntu3) ... Setting up cec-utils (4.0.4+dfsg1-4ubuntu3) ... Setting up libjack-jackd2-0:arm64 (1.9.12~dfsg-2ubuntu2) ... Setting up libsndfile1:arm64 (1.0.28-7ubuntu0.3) ... Setting up libsm6:arm64 (2:1.2.3-1) ... Setting up libsnapd-glib1:arm64 (1.58-0ubuntu0.20.04.0) ... Setting up libpulse0:arm64 (1:13.99.1-1ubuntu3.13) ... Setting up libpulsedsp:arm64 (1:13.99.1-1ubuntu3.13) ... Setting up pulseaudio-utils (1:13.99.1-1ubuntu3.13) ... Setting up libasound2-plugins:arm64 (1.2.2-1ubuntu1) ... Setting up pulseaudio (1:13.99.1-1ubuntu3.13) ... Adding user pulse to group audio Created symlink /etc/systemd/user/default.target.wants/pulseaudio.service → /usr/lib/systemd/user/pulseaudio.service. Created symlink /etc/systemd/user/sockets.target.wants/pulseaudio.socket → /usr/lib/systemd/user/pulseaudio.socket. Processing triggers for libc-bin (2.31-0ubuntu9.18) ... Processing triggers for systemd (245.4-4ubuntu3.24) ... Processing triggers for dbus (1.12.16-2ubuntu2.3) ... root@hi3798mv300:~# # 在海纳思系统启用AirPlay root@hi3798mv300:~# sudo apt install shairport-sync Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libconfig9 libmosquitto1 The following NEW packages will be installed: libconfig9 libmosquitto1 shairport-sync 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 252 kB of archives. After this operation, 833 kB of additional disk space will be used. Do you want to continue? [Y/n] y Abort. root@hi3798mv300:~# # 测试脚本(开发者工具 > 服务) root@hi3798mv300:~# service: media_player.play_media -bash: service:: command not found root@hi3798mv300:~# target: -bash: target:: command not found root@hi3798mv300:~# entity_id: media_player.living_room_tv -bash: entity_id:: command not found root@hi3798mv300:~# data: -bash: data:: command not found root@hi3798mv300:~# media_content_id: "http://192.168.68.142:8123/local/test.mp3" # 测试音频URL -bash: media_content_id:: command not found root@hi3798mv300:~# media_content_type: "audio/mp3" -bash: media_content_type:: command not found root@hi3798mv300:~# 我按照你说的弄完了 还是不行 电视放声音音响不出声音
最新发布
07-01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值