[Ubuntu/Linux] Eggdrop 'invalid user file'

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
gilthanaz
Site Admin
Posts: 444
Joined: Fri Aug 29, 2003 9:29 pm
Contact:

[Ubuntu/Linux] Eggdrop 'invalid user file'

Post by gilthanaz »

[Problem]
Eggdrops that have been running for YEARS without a problem died today. The reason: The drive where they write their .user and the logfiles was filled to the last bit. The bots tried to write information to their .user files and appearently failed to do so, yet saving the uncomplete changes and thus, ruining the user file.


[Solution]
Even tho you lose your ownership and user logins/passwords, the only real reason to fix this *fast* is to delete the .user files of the eggdrops.

In our case, the directory is owned by user:group = irc:irc, which is important in ubuntu for security reasons. But also, this makes it rather interesting to fix this issue. Where normally a 'su' is enough, here we of course need 'sudo su' :)

First, kill all eggdrops. Thats quite easy... 'sudo killall eggdrop'. Find out what the config files of your eggdrops are named. We will use 'bot1.conf' and 'bot2.conf'.

Go to the eggdrop home directory and delete the corresponding bot1.user and bot2.user file. Be aware that the name of the user files can be different from the config filename, and you can akquire it from reading the .conf file.

Once the .user files are deleted, you have to reload the eggdrop and do the following for each one (better one by one, not all at the same time...):

In our case, since the eggdrop home dir is owned by irc:irc, we have to do this to reinitialize the eggdrops user file and become owner of it again:

Code: Select all

sudo su irc -c "./eggdrop -m bot1.conf"
This will restart bot1 in user file creation mode. Now go to the IRC server the bot will log on to, and message it:

Code: Select all

/msg bot1 hello
The first one to msg it will become BOT master. The bot will let you know that, and ask for a password. Set a new master password with:

Code: Select all

/msg bot1 pass my-pass
After that, you can kill the bot again so save the changes to the .user file. Rinse and repeat for all your bots with broken .user files.

After this, restart all your bots with your usual start scripts. They should come up nicely and without whining about broken .user files now. If you have to set users that had been set before do so. But at least the bots are back up :)
Post Reply