Main > Miscellaneous > Security >

passwd_info 0.1

passwd_info 0.1

Sponsored Links

passwd_info 0.1 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: MB
Platform: Any Platform
License: GPL (GNU General Public License)
Price:
Downloads: 960
Date added: 2007-03-13
Publisher: Kevin Waldron

passwd_info 0.1 description

passwd_info is a simple program that can query the /etc/passwd file for current user or specified user.

USAGE: passwd_info [username]

Sample:

#include < unistd.h >
#include < stdlib.h >
#include < stdio.h >
#include < sys/types.h >
#include < pwd.h >
#include < string.h >

struct passwd *pw;

void print_usage(void);

int main( int argc, char *argv[] )
{
if ( argc > 2 ) {
print_usage();
exit(1);
}

char *name;
uid_t uid;
gid_t gid;
char *gecos;
char *dir;
char *shell;

char *user_arg;

if ( argv[1] != NULL ) {
user_arg=(char *)malloc(strlen(argv[1]));
strcpy( user_arg, argv[1] );
if ( (pw = getpwnam(user_arg) ) == NULL ) {
fprintf( stderr, "Error: user %s does not existn", user_arg );
exit(1);
}
uid = pw->pw_uid;
free(user_arg);
}
else /* get for current user */
{
uid = getuid();
pw = getpwuid(uid);
}

name = pw->pw_name;
gid = pw->pw_gid;
gecos = pw->pw_gecos;
dir = pw->pw_dir;
shell = pw->pw_shell;

printf( "/etc/passwd file information for %sn", name );
printf( "Username = %stUID = %dtGID = %dn", name, (int)uid, (int)gid );
printf( "GECOS = %snHome = %stShell = %sn", gecos, dir, shell );

exit(0);
}

void print_usage( void )
{
fprintf( stderr, "USAGE: passwd_info [username]n" );
}

passwd_info 0.1 Screenshot

Advertisements

passwd_info 0.1 Keywords

Bookmark passwd_info 0.1

Hyperlink code:
Link for forum:

passwd_info 0.1 Copyright

WareSeeker periodically updates pricing and software information of passwd_info 0.1 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of passwd_info 0.1 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
PC-Info project is a Server-Client Software using the Adaptive Communication Environment (ACE). Free Download
Passwd is the Horde password changing application. Free Download
Passwd is the Horde password changing application. Free Download
ChangePassword changes passwd, Samba, and Squid passwords. Free Download
Movie::Info is a Perl module created to get meta data from various format movie files. Free Download
App::Info::Lib is a Perl module that contains information about software libraries on a system. Free Download
RearSite is a simple collaborative Web site manager. Free Download
Userinfo is a console utility to display a variety of information about a local user. Free Download