Articles of chroot

Debian – chroot ntpd问题

我想在chroot环境中configurationntp守护进程。 我起诉的操作系统是Debian 9.1,kernel 3.16.0-4-686-pae 该服务运行如下:/ usr / sbin / ntpd -p /var/run/ntpd.pid -i / var / chroot / ntp -u ntp:ntp -l /var/log/ntpd.log 我面临的问题是: 1)ntp守护程序无法parsingDNS名称,但其IP地址正常工作。 我是否缺lesschrootpath中的任何特殊文件? ntpd[2936]: retrying DNS 1.gr.pool.ntp.org: Name or service not known (-2) ntpd[2936]: retrying DNS 1.europe.pool.ntp.org: Name or service not known (-2) ntpd[2936]: retrying DNS 0.europe.pool.ntp.org: Name or service not known […]

我需要帮助build立一个chroot监狱

我一直在遵循这个教程http://olivier.sessink.nl/jailkit/howtos_chroot_shell.html为我的SSH用户设置一个chroot监狱。 我的sshd_config有这个在里面: Match group backup-users ChrootDirectory /home/jail/ 但是当我login的时候会发生什么事情,ssh连接立即终止。 /var/log/auth.log说: 7月13日19:37:02 obu1 sshd [21225]:从###。###。###。### portuser 63718 ssh2接受testuser的密码 7月13日19:37:02 obu1 sshd [21225]:pam_unix(sshd:session):会话为用户testuser(uid = 0) 7月13日19:37:03 obu1 sshd [21225]:pam_unix(sshd:session):会话closures用户testuser 我究竟做错了什么? 输出尝试的ssh: jerome @ obu1:〜$ ssh localhost -p 222 -l testuser testuser @ localhost的密码: Linux主机名2.6.26-2-amd64#1 SMP Sun Jun 21 04:47:08 UTC 2009 x86_64 Debian GNU / Linux系统附带的程序是自由软件; 每个程序的确切分配条件都在下面描述 / […]

自定义initrd init脚本:如何创build/ dev / initctl

我有一个装有两个IDE HDD(/ dev / hda和/ dev / hdb)的虚拟机(VMM是Xen 3.3)。 根文件系统位于/ dev / hda1,其中安装了Scientific Linux 5.4。 / dev / hdb包含一个空的ext2文件系统。 我想通过使用aufs(AnotherUnionFS)来保护根文件系统免受虚拟机的写入,从而在根文件系统之上分层写入一个可写的文件系统。 /的更改将写入位于/ dev / hdb的文件系统。 (此外,在虚拟机之外,支持/ dev / hda的文件也将被设​​置为只读权限,所以VMM也应该防止虚拟机在该级别修改。)(此设置的目的:能够使用软件实现的故障注入破坏虚拟机,但保留文件系统映像以便快速将VM重新引导到无故障状态。) 如何获得一个initrd初始化脚本来执行必要的挂载来创build联合文件系统? 我已经尝试了两种方法: 我试过修改mkinitrd创build的nash脚本,但是我不知道setuproot和switchroot做了什么,以及如何让它们使用我的aufs作为新的根。 显然, 这里没有人知道。 (编辑:我拿回来。) 我试过build立一个LiveCD(使用linux-live-6.3.0),然后从生成的initrd修改Bash / linuxrc脚本,我得到了正确的安装,但是最终/ sbin / init抱怨/ dev / initctl 。 具体来说,我的/ linuxrc在/ union加载aufs。 / linuxrc的最后几行有效地执行以下操作: cd /union mkdir -p mnt/live pivot_root […]

在chroot中chroot

我正在使用Centos 5.2,当我尝试使用脚本创build一个chroot监狱时,我得到: 复制/ usr / bin / scp的库。 (0x00007fff17bfe000)cp:can stat'(0x00007fff17bfe000)':没有这样的文件或目录… 我目前在机架空间云服务器上使用,所以我怀疑这些依赖关系是在我自己的根之外。 有没有人有一个更好的主意,使用Centos 5.2在一台云服务器上监禁sftp服务器?

如何在chroot中允许passwd?

我有一个多用户服务器,它把用户的一个子集放在一个chroot中。 我想允许所有用户调用passwd来更改他们各自的密码。 我能想到的其他任何事情都是矫枉过正,或者可能会危及系统安全。 我用makejail使用以下configuration来构build我的chroot。 chroot="/var/chroot/sshd" cleanJailFirst=1 # these are binds to the actual location, hence, we don't want makejail to be tinkering with those. preserve=["/home","/etc/passwd","/etc/group","/srv"] testCommandsInsideJail=["bash","sh","ls","pwd","stat","whoami","svnserve -t","locale","localedef","man ssh","man scp","cat","nano","vim","ssh","scp","passwd"] testCommandsOutsideJail=[] packages=["coreutils"] # speed up things a bit sleepAfterStartCommand=0.8 sleepAfterTest=0.8 正如你所看到的,在testCommandsInsideJail ,我列出了passwd ,但是如果我作为testuserlogin(谁在chroot里面),我得到: $ passwd Changing password for test. (current) UNIX password: passwd: Authentication token manipulation […]

Chroot在.bashrc中为用户; 不允许的操作

我试图在用sshlogin时chroot一个用户。 所以,我所做的是.bashrc下行添加到他们的.bashrc文件中: chroot /apps/web 当我与用户login虽然,我得到: chroot: cannot change root directory to /apps/web: Operation not permitted / apps / web上的权限是root用户和group拥有的。 有任何想法吗?

需要支持在Debian上创buildDovecot监听器(postfix)

我想在/ var / spool / postfix / private /下创build一个dovecot lmtp监听器。 因为postfix在debian下默认运行chroot。 我怎样才能做到这一点? Grtz

如何禁用PHP的ini_set特定的configuration选项?

我正在运行PHP 5.3.8的设置,并使用php-fpm的chrootfunction来分隔多个客户。 所以每个客户都有自己的chrooted PHP环境,这相当好。 我现在想禁止客户使用ini_set更改他的PHP实例的memory_limit 。 另一方面,我不想完全禁用ini_set 。 所以我正在寻找一种可能性来禁止通过ini_set设置特定的PHPconfiguration选项(如memory_limit )的可能性。 有人知道如何做到这一点?

vsftpd chroot_local_user错误

当我在vsftpdconfiguration中将chroot_local_user设置为YES时,在我的ftp客户端中出现这个错误: 220: (vsFTPd 2.3.5) Connected to 23.21.50.255. Cmd: AUTH TLS 234: Proceed with negotiation. Cmd: USER ftpaccess 331: Please specify the password. Cmd: PASS xxxxxxxx Could not read reply from control connection: Unknown error: 0. 而这个在/var/log/vsftpd.log文件中: Wed May 16 04:51:42 2012 [pid 2] CONNECT: Client "68.224.80.95" Wed May 16 04:51:43 2012 [pid 1] [ftpaccess] OK […]

chroot'ing Apache来防止shell脚本?

最近我被告知用户有我的系统“炮轰”。 虽然在Apache错误日志等没有任何不寻常的活动或错误,我宁愿安全,而不是遗憾。 所以:如果我运行chroot Apache,它会阻止shell脚本能够检索敏感信息吗? 即能够做一个mysqldump或类似的东西,不pipe如果具有数据库细节的configuration文件在Apache监狱? 谢谢