LL2_RENAME_USER(3)
π LL2_RENAME_USER(3) π
okay so this is a page from the Programmers Manual section 3, bestie β it's LL2_RENAME_USER, and it's literally the glow-up makeover function for usernames β¨
π NAME π
ll2_rename_user β renames a user entry. that's it, that's the whole job. she rebrands π
πΈ SYNOPSIS πΈ
#include <lastlog2.h>
int ll2_rename_user (struct ll2_context *context, const char *user,
const char *newname, char **error);
π¦ DESCRIPTION π¦
so what she does is: she changes the user name from user to newname on one entry in the database β and that database is the one defined by context. π«Ά
and heads up, bestie: all other entries with the user user will be deleted. not renamed, not archived, deleted. so likeβ¦ be aware π
if context is NULL, then the default database β the one defined in LL2_DEFAULT_DATABASE β gets taken instead. no context, no problem.
here's the vibe in code form:
char *error = NULL;
const char *user = "root";
const char *new_user = "notroot";
int ret = ll2_rename_user (NULL, user, new_user, &error);
β RETURN VALUE β
- returns
0on success β slay π - returns
-ENOMEMor-1on other failure π errorcontains an error string if the return value is-1- but ngl,
erroris not guaranteed to contain an error string β it could also beNULL - and
errorshould be freed by the caller, so don't forget her π«Ά
π AUTHORS π
Thorsten Kukuk <kukuk@suse.de> β the icon who made this happen π
π SEE ALSO π
lastlog2(3)ll2_new_context(3)ll2_unref_context(3)ll2_read_all(3)ll2_write_entry(3)ll2_read_entry(3)ll2_remove_entry(3)ll2_update_login_time(3)ll2_import_lastlog(3)
the whole friend group fr fr π
π REPORTING BUGS π
found a bug? no cap, go tell them β use the issue tracker: <https://github.com/util-linux/util-linux/issues> π§
π AVAILABILITY π
the liblastlog2 library is part of the util-linux package since version 2.40. you can download it from the Linux Kernel Archive: <https://www.kernel.org/pub/linux/utils/util-linux/> β¨
and that's the page, bestie π this was util-linux 2.41.6, dated 2026-08-31 β she's serving LL2_RENAME_USER(3) and honestly? iconic. periodt. π
π₯
π¦ where this page comes from
- alpine 3.22: util-linux-doc 2.41.6-r1 Β· GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-2.0-only AND GPL-1.0-only AND LGPL-2.1-or-later AND BSD-1-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND MIT AND Public-Domain
- alpine 3.23: util-linux-doc 2.41.6-r1 Β· GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-2.0-only AND GPL-1.0-only AND LGPL-2.1-or-later AND BSD-1-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND MIT AND Public-Domain
- fedora 43: liblastlog2-devel 2.41.6-1.fc43 Β· BSD-2-Clause
- fedora 43: liblastlog2-devel 2.41.6-1.fc43 Β· BSD-2-Clause
- fedora 44: liblastlog2-devel 2.41.6-1.fc44 Β· BSD-2-Clause
- fedora 44: liblastlog2-devel 2.41.6-1.fc44 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms