Articles of linux

如何使用PAM检查某些用户的LDAP密码,但始终使用本地文件中的UID / GID?

对于/etc/passwd的一部分用户,我想configurationPAM(在Linux上)对LDAP服务器执行login密码检查部分,忽略这些用户实际上在/etc/passwd 。 特别是, /etc/passwd和/etc/group应该在所有的情况下用于UID和GID,这样uidnumber和gidnumber等属性不需要被添加到目录(这里是Active Directory)文档,如LDAP Implementation HOWTO 。 这甚至可能(没有自定义PAM模块开发)? 将属性添加到LDAP目录是不可行的。 我不是Active Directory域pipe理员,并且不断增加对该级别的介入超出了此项目的范围。 系统在大多数Windows服务器环境中运行的情况; 如果指定的Windows用户可以在有问题的系统上使用他们的AD密码,那将会很好。 根据用户的不同,用户应该通过UNIX身份validation或LDAP身份validation进行检查,但不能同时进行。 我可能不会向Active Directory中的用户添加属性,但可能会将其添加到安全组(实际上还希望进一步要求LDAP用户位于特定的LDAP安全组中)。

“内核:无法读取proc文件系统:1 – 操作不允许” – 在OpenVZ VPS上,每分钟有数百万个这样的消息在kern.log中?

我看到我的OpenVZ Ubuntu 12.04服务器上的反复无休止的消息在kern.log中。 Mar 2 06:23:33 localhost kernel: Cannot read proc file system: 1 – Operation not permitted. Mar 2 06:24:04 localhost kernel: last message repeated 5082222 times Mar 2 06:25:05 localhost kernel: last message repeated 9939060 times Mar 2 06:26:06 localhost kernel: last message repeated 8501480 times Mar 2 06:27:07 localhost kernel: last message […]

Kerberos ktutil,有哪些encryption可用?

我正在尝试使用ktutil做一个keytab。 我可以selectencryptiontypes,但是ktutil手册页没有提供可能的select列表。 我也不知道哪种encryption方法是最好的! 我怎样才能找出这两个? 我想要最强大的encryptionfunction。 $ ktutil > add_entry -password -p [email protected] -k 1 -e [what goes here?!]

Nagios – check_ntp_time – 偏移量未知

我有一个在子网上运行的本地NTP服务器,使其他子网节点保持同步,而不是每个节点都与上游服务器同步。 但是,在为Nagios实现check_ntp_time插件时,我注意到一个令人沮丧的问题,那就是nagios不断报告与本地ntp服务器同步的本地节点的严重错误。 这里是在本地ntp服务器上的ntpconfiguration,注意上游服务器条目和限制条目,根据我的研究,这将本节点定义为ntp服务器,本地节点可以同步。 driftfile /var/lib/ntp/drift # Permit time synchronization with our time source, but do not # permit the source to query or modify the service on this system. restrict default kod limited nomodify notrap nopeer noquery restrict -6 default kod limited nomodify notrap nopeer noquery # Permit all access over the loopback interface. This […]

使用gitpipe理puppet模块

我有一个在Debian 7上运行的puppet / foreman服务器来pipe理我的系统。 我使用社区版本3.7的木偶和领class1.6.0。 我使用目录环境。 目前我使用一个相当复杂的工作stream程来创build我的自我编写的模块,在我的开发环境中进行颠覆控制,然后将它们导出到外部目录,构build一个puppet模块(puppet module build …)和在生产中安装。 我认为将它们分支/标记为颠覆性的生产,但是由于我记不起来的原因,我认为这是出乎意料的。 同时我学到了一些git,宁愿用git代替颠覆。 我的问题是现在是否有最好的做法呢? 我可以想象至less有两种方法都有其优缺点。 一个是将版本控制下的环境开发,然后克隆/分支到生产。 其次是将每个模块的git repo克隆到环境中。 正如我所说,我是新手,所以我没有真正的线索,它的优点和缺点。 另外,我只用了约8个月的木偶和工头。 干杯,克里斯托弗

确定出站stream量的始发过程

我可以看到我的服务器正在发送大量的stream量。 如果我去netstat -apln | grep的httpd我可以看到,所有的stream量将去一个IP。 有没有一种方法,我可以看到什么脚本/文件被用来发送数据到该IP? 或一般的任何IP? 我知道tcpdump可以看数据包,但似乎无法做到这一点。

运行NTP,服务器时间在虚拟机上是错误的

服务器时间是7个小时(而不是上午10点,是凌晨3点,即使date显示正确的时区)。 ntpq的输出是: $ ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== xx.xxx.xxx.x.ar xxx.x.xx.xx 2 u 72 1024 177 6.516 2520657 1650156 ntp.xxxx.ac.uk xxx.xxx.xxx.x 2 u 7h 1024 377 14.039 2520655 1347346 xxx.xxx.xxx.xx xxx.xxx.xxx.x 2 u 114 1024 377 5.449 -18.941 2130343 ns1.xxxxxxx.com xxx.x.xx.xx 2 u 148 1024 377 8.050 2520655 […]

debian镜像:哈希总和不匹配

我有一个镜像服务器,我在学校维护。 $ uname -a Linux CSE-Cloud01 4.0.0-1-amd64#1 SMP Debian 4.0.2-1(2015-05-11)x86_64 GNU / Linux $ sudo apt-get update …… W: Failed to fetch http:// mirror.cs.nchu.edu.tw/debian/dists/jessie/main/source/Sources Hash Sum mismatch W: Failed to fetch http:// mirror.cs.nchu.edu.tw/debian/dists/jessie/main/binary-amd64/Packages Hash Sum mismatch W: Failed to fetch http:// mirror.cs.nchu.edu.tw/debian/dists/jessie/non-free/binary-amd64/Packages Hash Sum mismatch W: Failed to fetch http:// mirror.cs.nchu.edu.tw/debian/dists/jessie/main/i18n/Translation-en Hash Sum mismatch E: […]

如何find断开xrdp会话?

我有一台运行xrdp的Xubuntu 14.04服务器,有几个用户连接到它。 现在有一个问题:从Windows瘦客户端通过RDP访问此服务器的用户通常使用“X”closuresRDP会话(因此断开连接但不注销)。 我知道在sesman.ini中有一些选项可以处理这种行为,但正如手册中所说,这些选项目前被忽略(并且已经存在多年)。 解决我的问题的选项是: KillDisconnected DisconnectedTimeLimit IdleTimeLimit 现在我需要破解一些处理断开连接的会话。 我的第一个想法是杀死所有断开连接的远程用户 – 但是我不知道如何获得那些会话断开连接的信息。 所以…我如何find断开的会话? 或者:是否有任何首选的方法来处理断开连接的会话?

如果ufw上的传出和传入都被阻塞,是否需要打开任何用于NTP同步的端口?

我的一台生产服务器UFWconfiguration如下: Status: active Logging: on (low) Default: deny (incoming), **deny (outgoing)**, disabled (routed) New profiles: skip To Action From — —— —- 22/tcp ALLOW IN Anywhere 22/tcp (v6) ALLOW IN Anywhere (uv6) 80/tcp ALLOW IN Anywhere 80/tcp (v6) ALLOW IN Anywhere (v6) 我已经通过安装ntp服务启用了NTP同步,目前正在运行。 当我运行ntpq -p ,我得到以下输出: remote refid st t when poll reach delay offset […]