Debian Codegraph @

liblastlog2/man/ll2_rename_user.3.adoc

raw
1 //po4a: entry man manual
2 = ll2_rename_user(3)
3 :doctype: manpage
4 :man manual: Programmer's Manual
5 :man source: util-linux {release-version}
6 :page-layout: base
7 :lib: liblastlog2
8 :firstversion: 2.40
9
10 == NAME
11
12 ll2_rename_user - Renames a user entry.
13
14 == SYNOPSIS
15
16 *#include <lastlog2.h>*
17
18 *int ll2_rename_user (struct ll2_context *__context__, const char *__user__,
19 const char *__newname__, char **__error__);*
20
21 == DESCRIPTION
22
23 Changes user name from _user_ to _newname_ of one entry in
24 database, which is defined by _context_. All other entries with the user _user_
25 will be deleted.
26 If _context_ is NULL, the default database, defined in _LL2_DEFAULT_DATABASE_,
27 will be taken.
28
29 --------------------------------------
30 char *error = NULL;
31 const char *user = "root";
32 const char *new_user = "notroot";
33
34 int ret = ll2_rename_user (NULL, user, new_user, &error);
35 --------------------------------------
36
37 == RETURN VALUE
38
39 Returns 0 on success, -ENOMEM or -1 on other failure.
40 _error_ contains an error string if the return value is -1.
41 _error_ is not guaranteed to contain an error string, could also be NULL.
42 _error_ should be freed by the caller.
43
44 == AUTHORS
45
46 mailto:[email protected][Thorsten Kukuk]
47
48 == SEE ALSO
49
50 *lastlog2*(3),
51 *ll2_new_context*(3),
52 *ll2_unref_context*(3),
53 *ll2_read_all*(3),
54 *ll2_write_entry*(3),
55 *ll2_read_entry*(3),
56 *ll2_remove_entry*(3),
57 *ll2_update_login_time*(3),
58 *ll2_import_lastlog*(3)
59
60 include::man-common/bugreports.adoc[]
61
62 include::man-common/footer-lib.adoc[]
63
64 ifdef::translation[]
65 include::man-common/translation.adoc[]
66 endif::[]