#include <pwd.h> #include <stdio.h> #include <stdlib.h> int main(void) { printf("%s %s\n", getpwnam("steve")->pw_name, g ...
#include <pwd.h> #include <stdio.h> #include <stdlib.h> int main(void) { printf("%s %s\n", getpwnam("steve")->pw_name, g ...
I need to know username of the user. In order to do this. I am using getpwuid() but I am getting this error. I just couldn't figure out what is t ...
I am trying to write a program in C that reads files from a directory and detects the name, user, group, and size of each file. The information for ea ...
I'm working on Linux and FreeBSD. When I use getpwnam() or getpwuid(), I get a pointer to a passwd struct. What's the safe way to use the char* member ...
Here's a small C program that prints (well, supposed to print) the real and effective IDs of a process when the file has the setuid flag set. In this ...
I'm having issues retrieving current user information of Red Hat Enterprise 6 where the user is an LDAP user? I have some code (actually part of an i ...
I'm trying to automate a SVK sync process. After configuring SVK mirrors, I wrote a batch file with the following then I add a Windows Scheduled ta ...
I am at the optimizing/analysing phase of a product that will go live in a couple of weeks, and I am astonished to find some leaks that do not (I beli ...
I'm trying to get my sandboxed mac app to get to the user's real home folder. This is what I tried But I'm getting this error: What am I missi ...
How can I obtain an array with uid and names? I could iterate from 0 to 99999 and do a getpwnam(). However most machines have less than 5 accounts, s ...
Perl has several built-in functions for accessing /etc/passwd on Unix systems (and elsewhere when supported) for user and group information. For insta ...
After I call getpwuid(uid), I have a reference to a pointer. Should I free that pointer when I don't use it anymore? Reading the man pages, it says th ...