• Health tips to prevent the spread of COVID-19:
    • Wash your hands frequently;
    • Maintain 2 meters social distancing;
    • Minimise outdoor activities.
    Stay safe in your bubble!

Manually rename ZNC username

Andy

Administrator
User ID
1
Joined
7 Jan 2019
Messages
204
Reaction score
8
Points
18
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:
Top