pam

Configuring MongoDB to authenticate user's password via Linux PAM

天大地大妈咪最大 提交于 2019-12-11 06:05:38
问题 I'm looking for a way to configure MongoDB to use Linux PAM to manage user passwords. This way when a user changes their password, it doesn't have to be manually updated in Mongodb. Searching for help for this online only returns one result which is a blog article that mentions this is possible but doesn't describe how this is done. The official documentation skips over setting up PAM and talks about LDAP. How can I configure Mongodb to authenticate db users via Linux PAM? 回答1: Unfortunately,

pam_unix(sudo:auth): conversation failed, auth could not identify password for [username]

社会主义新天地 提交于 2019-12-11 06:04:50
问题 I'm using ansible to provision my Centos 7 produciton cluster. Unfortunately, execution of below command results with ansible Tiemout and Linux Pluggable Authentication Modules ( pam ) error conversation failed . The same ansible command works well, executed against virtual lab mad out of vagrant boxes. Ansible Command $ ansible master_server -m yum -a 'name=vim state=installed' -b -K -u lukas -vvvv 123.123.123.123 | FAILED! => { "msg": "Timeout (7s) waiting for privilege escalation prompt:

orcale安装(grid 及变量的编写 )

最后都变了- 提交于 2019-12-07 04:23:11
环境:cenos6.8 软件:11.2.0.1.0 安装前的oracle了解 oracle: 关系型数据库(mysql)主要存放数据和二维表结构 非关系型数据库:树型结构 1.安装前准备: 1.1.OS层面设置: 1.1.1.关闭iptables、selinux(getenforce setenforce)、ntp、ntpdate病设置开机不启动例如:chkconfig xxx off; 1.1.2.设置ip 1.1.3.设置/etc/hosts xxxx.xxxx.xxxx.xxxx name 1.1.4.设置主机名 永久生效:vim /etc/sysconfig/network HOSTNAME=xxxx 在线生效不重启:hostname xxxx 1.2.GI相关设置 1.2.1.创建用户及所属组 [root @localhost ~]# groupadd -g 1000 oinstall [root @localhost ~]# groupadd -g 1001 asmadmin [root @localhost ~]# groupadd -g 1002 asmdba [root @localhost ~]# groupadd -g 1003 asmoper [root @localhost ~]# groupadd -g 1004 dba [root@localhost

centos 6.8下制作openssh8.1rpm包并升级

北慕城南 提交于 2019-12-07 03:13:43
今天在工作上遇到一个问题,在做安全扫描的时候发现,openssh有比较多的漏洞,按照绿盟扫描器的建议需要升级到最新版本。但是生产环境升级的时候会遇到很多的问题,所以决定在测试环境下打成rpm包上传到生产环境下进行升级。 备份 在做所有的变更都要备份,如果有问题可以随时回滚。 mkdir /opensshbackup cd /opensshbackup mkdir -p /opensshbackup/ssh mkdir -p /opensshbackup/binssh mkdir -p /opensshbackup/sbinssh cp /etc/ssh/* /opensshbackup/ssh cp /etc/pam.d/sshd . cp /usr/bin/ssh* /opensshbackup/binssh cp /usr/sbin/ssh* /opensshbackup/sbinssh 安装基础依赖 yum install rpm-build zlib-devel openssl-devel gcc perl-devel pam-devel unzip wget -y 使用rpmbuild进行构建 解压包 tar xvf openssh-8.1p1.tar.gz cd openssh-8.1p1 创建一个目录SOURCES mkdir SOURCES cd SOURCES

ssh因Operation not permitted导致无法登录系统

坚强是说给别人听的谎言 提交于 2019-12-06 06:03:46
以前碰到过,可好记性不如笨笔头,而且这次属于"严重事故",必须记录下来。 为什么会出现这个错误提示? 1. root用户执行或设置了ulimit -n unlimited nofile它不识别unlimited,它是一个有限的值。如果你在/etc/security/limits.conf设置了nofile的unlimited,OK,你要跪了,不能登录操作系统啦。 2.root用户执行或设置了一个超出允许范围的值,如ulimit -n 1122334455 永久修改: /etc/security/limits.conf 的 nofile参数(或/etc/security/limits.d/目录下添加nofile参数) 3.非root用户设置了比他分配到(/etc/security/limits.conf决定)的nofile还大(非root用户只能是越调越小,root不限制) 当你无法登录操作系统,连阿里云管理控制台都进不去,阿里云又不能单用户模式,只能发工单让阿里云的挂盘修改,是不是很可怕,更可怕是跟阿里云技术沟通!个人用户不受重视啊(派个小兵,走下流程,要是发生在线上就是事故了)。 我们知道,ulimit命令是用来shell启动进程所占用的资源限制的。 而nofile(max number of open file descriptors)是有一个上限的,由内核参数nr

CentOS7静默安装Oracle11gR2

落花浮王杯 提交于 2019-12-06 02:47:36
使用最小化的设定安装完CentOS7后,进入安装Oracle步骤前,需要安装几个工具。具体步骤: yum -y install vim --vim编辑器 yum -y install unzip --zip文件的解压工具 yum -y install lrzsz --上传下载工具 yum -y update --升级所有包,系统版本和内核,改变软件设置和系统设置 注:使用yum安装前,先保证系统可访问互联网。如果在系统无法访问的情况下,可以配置yum资源中心为镜像文件或者下载rpm包进行安装。 完成工具的安装之后,准备进入Oracle的安装过程。 第一步: 安装必须的依赖包 yum -y install gcc yum -y install gcc-c++ yum -y install make yum -y install binutils yum -y install compat-libstdc++-33 yum -y install elfutils-libelf yum -y install elfutils-libelf-devel yum -y install elfutils-libelf-devel-static yum -y install glibc yum -y install glibc-common yum -y install glibc-devel

pam_appl.h and pam_misc.h missing, in rshd.c source code

白昼怎懂夜的黑 提交于 2019-12-05 02:45:20
I am working on a centOS 5.5 OS . It shows error that /security/pam_appl.h and /security/misc.h file is missing. Actually my rshd.c does not loads PAM module, may be by putting this libraries, it helps me to work my rshd fine. That's why I posted this question. Error:- rshd.c:90:31: error: security/pam_appl.h: No such file or directory rshd.c:91:31: error: security/pam_misc.h: No such file or directory I search a lot but didn't get any useful rpm that gives these files. Some links are here . But not suitable for centOS. Help me. Tell me how can I overcome from this problem. Edit no 1 Your

centos7.4 搭建FTP 安装vsftpd

只愿长相守 提交于 2019-12-04 22:53:40
#1. 安装vsftpd #安装vsftpd yum install -y vsftpd #2. 配置vsftpd.conf #备份配置文件 cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.bak #执行以下命令 sed -i "s/anonymous_enable=YES/anonymous_enable=NO/g" '/etc/vsftpd/vsftpd.conf' sed -i "s/#anon_upload_enable=YES/anon_upload_enable=NO/g" '/etc/vsftpd/vsftpd.conf' sed -i "s/#anon_mkdir_write_enable=YES/anon_mkdir_write_enable=YES/g" '/etc/vsftpd/vsftpd.conf' sed -i "s/#chown_uploads=YES/chown_uploads=NO/g" '/etc/vsftpd/vsftpd.conf' sed -i "s/#async_abor_enable=YES/async_abor_enable=YES/g" '/etc/vsftpd/vsftpd.conf' sed -i "s/#ascii_upload_enable=YES/ascii

PHP/PAM to change user password?

删除回忆录丶 提交于 2019-12-04 14:03:46
问题 Are there any working packages to change a linux user passwords using PHP? I've tried using PECL:PAM but theres an error when it tries to change the password. Edit: PHP code: echo pam_chpass($username, $password, $new_pass, &$error) ? 'good' : $error; PHP (echo) output: Permission denied (in pam_authenticate) From /var/log/auth (these are actually from before, the log doesn't seem to be working ATM for some reason yet to be determined): Jun 11 15:30:20 veda php: pam_unix(php:chauthtok):

saltstack 的 api

风格不统一 提交于 2019-12-04 09:43:07
上篇记录了 saltstack 的安装与配置和简单的使用,但是你会发现基本所有操作,都需要登录到 master机上进行命令行操作,虽然命令行才是最强大的,但是对于新手和入门时的学习使用和管理非常不友好。 然而 salt 已经为我们想到了,下面将为 saltstack 配置一个 web 界面,通过 web 界面来实现一些管理功能,由于 saltstack 官方本身时没有 web 界面的。 一、环境准备 系统为 centos7.2,python 版本为2.7 安装 salt-api [root@V1 ~]# yum install -y salt-api 二、具体配置 添加用户,用户 api 认证 [root@V1 ~]# useradd -M Amos 创建master的配置文件目录 [root@V1 ~]# mkdir /etc/salt/master.d 添加 api 的配置文件,同来配置 api 接口服务的端口和一些设定 [root@V1 ~]# cat /etc/salt/master.d/api.conf rest_cherrypy: port: 8000 debug: True #ssl_crt: /etc/pki/tls/certs/localhost.crt #ssl_key: /etc/pki/tls/certs/localhost.key disable_ssl: