当然也可以用最简单的办法修改admin的密码,那就是ssh进去你的服务器,敲下:
passwd admin
连续输入两次你想要重新设置的admin密码,然后service directadmin restart,重启directadmin服务,就ok了,实在不行,再重启一次服务器。
但是有时候admin无法登陆https://ip:2222管理directadmin,怎么办呢?无法登陆directadmin的时候,需要查看日志,是否权限设置错误,或无法读取配置文件所导致.
一般来说,主要文件为以下几个:
/usr/local/directadmin/data/templates/proftpd.conf
/usr/local/directadmin/data/templates/directadmin.conf
/usr/local/directadmin/data
/usr/local/directadmin/data/admin
/usr/local/directadmin/data/tickets
/usr/local/directadmin/data/users
/home/tmp #这个tmp权限不对,也会导致容量大小显示错误
/usr/local/directadmin/data/sessions
/etc/virtual
/var/spool/virtual
/usr/local/directadmin/data/admin/ips
/usr/local/directadmin/data/admin/packages
/usr/local/directadmin/data/admin/packages.list
/usr/local/directadmin/data/admin/login.hist #权限
/usr/local/directadmin/data/admin/next_ticket.number #权限
/usr/local/directadmin/data/admin/services.status #权限
/usr/local/directadmin/data/admin/ip.list #权限
/usr/local/directadmin/data/users/admin/ip.list #权限
如果排除密码的问题,directadmin无法登陆,以下方法可以解决.
cd /usr/local/directadmin/data/users
mkdir admin
chown diradmin:diradmin admin
chmod 711 admin
cd /usr/local/directadmin
./directadmin i
./data/admin/login.hist written successfully
./data/admin/next_ticket.number already exists
*** Unable to write ./data/admin/services.status : Unable to stat ./data/admin/services.status.temp for filesize after write<br>
ConfigFile::removeFile(./data/admin/services.status) filename does not match<br>
tickets.list written successfully
exiting due to previous errors
---
转载请注明本文标题和链接:《diretadmin忘记admin密码怎么办?》
发表评论