-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert the 2006 version .PASSWD to the latest version: 波若波罗密! #4
Comments
Update Jan 20, 20211. All files together$ ls -l /bbs/tmp/convert/
-rwxr-xr-x 1 bbs bbs 12951300 Jan 18 19:10 PASSWDS.2005.new
-rwxr-xr-x 1 bbs bbs 30600000 Jan 18 19:10 PASSWDS.2005.old
-rwxr-xr-x 1 bbs bbs 22400000 Jan 18 18:19 PASSWDS.2020
-rw-r--r-- 1 bbs bbs 1618 Jan 18 19:03 zixia2020.c Latest file & code
Old (2006) files
Some source code (utils) can be found in the same directory but I'm not sure which one is the right one. (I had tried the ProgressThe right |
PASSWDS.2005.old是可以使用的用户数据库。问题在于这个备份文件userec结构只有204字节,但当前的结构有320字节。
|
大部分用户的home mail目录应该已经被删除了。需要修复的时候建立,内容肯定没了 |
这可能就是我怎么都搞不定的主要原因了。。。能通过 time_t 的数据看出是否 64 位架构编译,上帝威武! |
Update 6:07 pm, Jan 21, 202143,171 zixia bbs users restored from 2006! K core V5! Orz bbs@bbs:~$ ps axf
PID TTY STAT TIME COMMAND
1 ? Ss 0:00 /bin/sh -c /entrypoint.sh
6 ? S 0:00 s6-svscan -t0 /var/run/s6/services
32 ? S 0:00 \_ s6-supervise s6-fdholderd
227 ? S 0:00 \_ s6-supervise kbs
233 ? Ss 0:00 | \_ bash ./run
241 ? S 0:00 | \_ sleep 3600
228 ? S 0:00 \_ s6-supervise apache
232 ? Ss 0:00 | \_ bash ./run
344 ? S 0:00 | \_ sleep 60
229 ? S 0:00 \_ s6-supervise sshd
231 ? Ss 0:00 \_ /usr/sbin/sshd -D -e -p 2222
255 ? Ss 0:00 \_ sshd: bbs [priv]
257 ? S 0:00 | \_ sshd: bbs@pts/0
258 pts/0 Ss 0:00 | \_ -bash
347 pts/0 R+ 0:00 | \_ ps axf
281 ? Ss 0:00 \_ sshd: bbs [priv]
283 ? S 0:00 | \_ sshd: bbs@pts/1
286 pts/1 Ss+ 0:00 | \_ -bash
345 ? Ss 0:00 \_ sshd: unknown [priv]
346 ? S 0:00 \_ sshd: unknown [net]
198 ? Ss 0:00 /kbs/bin/miscd timed
202 ? S 0:00 \_ /kbs/bin/miscd killd
203 ? S 0:00 \_ /kbs/bin/miscd userd
209 ? S 0:00 \_ /kbs/bin/miscd flushd
206 ? S 0:00 /kbs/bin/bbslogd
210 ? S 0:00 /kbs/bin/bbsd -p 23
263 ? Ss 0:00 \_ bbsd:zixia sd -p 23
276 ? Ss 0:00 \_ bbsd:KCN bbsd -p 23
323 ? Ss 0:00 \_ /kbs/bin/bbsd -p 23
211 ? Ss 0:00 /kbs/bin/sshbbsd -p 22 |
备份文件的结构如下,已经恢复完毕: #define IDLEN 12
#define IPLEN 16
#define NAMELEN 40
#define MAXCLUB 128
#define MD5PASSLEN 16
#pragma pack (4)
#define time_t unsigned int
struct userec { /* Structure used to hold information in */
char userid[IDLEN + 2]; /* PASSFILE */
char flags; /*一些标志,戒网,版面排序之类的*/
unsigned char title; /*用户级别*/
time_t firstlogin;
char lasthost[16];
unsigned int numlogins;
unsigned int numposts;
char username[NAMELEN];
unsigned int club_read_rights[MAXCLUB>>5];
unsigned int club_write_rights[MAXCLUB>>5];
unsigned char md5passwd[MD5PASSLEN];
unsigned userlevel;
time_t lastlogin;
time_t stay;
int signature;
unsigned int userdefine[2];
time_t notedate;
int noteline;
int notemode;
time_t exittime;
/* 生日数据转移到 userdata 结构中 */
unsigned int usedspace; /* used space of user's mailbox, in bytes */
char unused[28];
}; |
The latest backup of the .PASSWD file only contains no more than 180 bbs users who have permanent life, which is really sad for the 斧头帮🪓 ... (we have lost almost all our members!)
So we need a 波若波罗密 via 月光宝盒!
Current <200 users .PASSWDS
bbs@bbs.zixia.net:~$ ls -l .PASSWDS -rwxr-xr-x 1 bbs bbs 22400000 Jan 5 09:48 .PASSWDS
The Hope: a
.PASSWDS
file from 2006What We Have
It seems there's a very high probability that the old/new
.PASSWDS
file is converted by the following source code: https://github.com/zixia/bbs.zixia.net/blob/main/kbs_bbs/contrib/convert/cnv_passwd.c, to be confirmed.Todo
Find the right struct & maxuser for the backup file from 2006, and then convert it to match our latest version of code!
The text was updated successfully, but these errors were encountered: