Manually rename ZNC username

Andy

Administrator
Creative Team
User ID
1
Joined
7 Jan 2019
Messages
1,126
Reaction score
57
Points
48
Instead of cloning a user, we can also manually edit the ZNC username on the znc.conf:

Firstly you will need to shutdown your ZNC bouncer:
Code:
/msg *status shutdown

Then run the following command:
Bash:
saputra@cana:~$ nano .znc/configs/znc.conf

Look for:
Code:
<User currentusername>

Type your new username:
Code:
<User newusername>

Then go to:
Code:
.znc/users/
And rename the folder from currentusername to newusername

For example:
Bash:
saputra@cana:~/.znc/users$ mv currentusername newusername -v
‘currentusername’ -> ‘newusername’

Back to ~/.local/bin/ and fire up your ZNC with ./znc, and login with the new username.
Q: Is giving a new username on znc.conf and then rename the ZNC user folder is enough?
A: Well, depends if you use some modules that only have their data in the global moddata folder instead of per user. (For example the lastseen module)

Tested on ZNC v1.8.0 and it worked 👍

Modules active were:
<global>: webadmin;
<user>: chansaver, controlpanel;
<network>: simpleaway, buffextras, chansaver, keepnick, kickrejoin, route_replies, sasl.

In this case, should just be global modules that would could contain any info, and I don't think webadmin is one of them that contains such info.

Hopefully this article sort your issue 😇
 
 Short URL:
Back
Top