Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.875.074 Times

passwd_info 0.1

  Date Added: March 26, 2010  |  Visits: 948

passwd_info

Report Broken Link
Printer Friendly Version


Product Homepage
Download (252 downloads)



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" ); }.

Requirements: No special requirements
Platforms: Linux
Keyword: Char Current User Info Miscellaneous Passwd Passwdinfo Pw Security Simple Program Uid User
Users rating: 0/10

License: Freeware
USER REVIEWS
More Reviews or Write Review


PASSWD_INFO RELATED
Modules  -  User Info 5.x--alpha1 1.0
User Info's current focus is to display everything that Drupal knows about registered users.It does not integrate with CCK or Views.InstallationUnpack in your modules folder (usually /sites/all/modules/) and enable under Administer > Site Building...
 
Modules  -  User Info 5.x--alpha1 1.0
User Info's current focus is to display everything that Drupal knows about registered users.It does not integrate with CCK or Views.InstallationUnpack in your modules folder (usually /sites/all/modules/) and enable under Administer > Site Building...
 
Modules  -  Jaiku 6.x-1.1 / 5.x- 1.0
The Full Stream, User Info, and the current presence information are supported.Jaiku is a microblogging service, similar to Twitter.It allows you to post anything in 140 characters or less to a web page on jaiku. It's main point over Twitter is...
 
Modules  -  Jaiku 6.x-1.1 / 5.x- 1.0
The Full Stream, User Info, and the current presence information are supported.Jaiku is a microblogging service, similar to Twitter.It allows you to post anything in 140 characters or less to a web page on jaiku. It's main point over Twitter is...
 
Accounting Tools  -  IconCool Customer Data Manager 2.5.121120
Iconcool Customer Data Manager is a professional customer data management application. It can help you manage and maintain your ever-increasing customer data easily. And it can import your order data into database from well-known ordering systems...
4.84 MB  
Networking  -  Get user info on Windows, for current user 1.0
Calling win32net.NetUserGetInfo(None, win32api.GetUserName(), 1) works for users logged in to the local machine, only, but fails for domain users. This code demonstrates how to query the domain controller if there is one.
 
Modules  -  Contact Form 7 Dynamic Text Extension 1.0.4.2
Contact Form 7 is an excellent WordPress plugin, and the CF7 DTX Plugin makes it even more awesome by adding dynamic content capabilities. While default values in Contact Form 7 are static. CF7 DTX lets you create pre-populated fields based on...
71.68 KB  
Modules  -  Forget User Info 0.2
This simple plugin inserts the following into the comment form: Not USER'S NAME? Click here to clear this info.When clicked, the comment cookies will be cleared, and the form will become empty. This only shows up if the user is not logged in (as...
10 KB  
Cookie and Cache Managers  -  Cookie Info 1.1+
Cookie Info is a relatively small and simple application that allows you to monitor for and selectively delete or view, newly created cookies (and delete or view cookies already present on your computer). Current features include; Auto-load with...
263 KB  
Libraries  -  Samba::LDAP::User 0.03
Samba::LDAP::User is a Perl module to manipulate a Samba LDAP User. SYNOPSIS use Carp; use Samba::LDAP::User; # create Template object my $user = Samba::LDAP::User->new() or croak "Cant create objectn"; Various methods to manipulate a...
81.92 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, SECURITY TOOLS
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Linux Software  -  GTK+ 2.5
GTK+, which stands for the GIMP Toolkit, is a library for creating graphical user interfaces for the X Window System. It is designed to be small, efficient, and flexible. GTK+ is written in C with a very object-oriented approach. Language bindings...
60 MB  
Security Tools  -  Free AntiSpyware 7.2.5
As powerful and professional anti-spyware software, Free AntiSpyware has ability to detect & stop the latest and most malicious programs that are doing harm to your computer and breaking your privacy. This free spyware remover software helps...
128.08 MB  
Security Tools  -  paraproxy 1.1
paraproxy is a supplement library for paramiko which adds support for SSH2 proxy commands. #md5=0c7041e8d2d7e49b09df526bba3efb28 #md5=1fbb4f888f40a01439ff27458c6210eb #md5=493c0f426e376427c30f3f39ebc8dac1
20.48 KB  
Security Tools  -  pam_smxs 1.6
pam_smxs is a PAM module that authenticates a user using challenge-response. All tokens that support ANSI X9.9 are currently supported and it provides full support for CryptoCard RB1 tokens.
522.24 KB  
Security Tools  -  DoudouLinux 2011-11
DoudouLinux [1] is a system specially designed for children to make computer use as easy and pleasant as possible for them (and for their parents too! [2]). DoudouLinux provides tens of applications that suit children from 2 to 12 years and tries...
964.17 MB  
Security Tools  -  django-auth-ldap 1.0.19
This authentication backend enables a Django project to authenticate against any LDAP server. To use it, add django_auth_ldap.backend.LDAPBackend to AUTHENTICATION_BACKENDS. It is not necessary to add django_auth_ldap to INSTALLED_APPLICATIONS...
30.72 KB