01-04-2005
Quote:
Originally posted by Perderabo
Hmmm...I guess Ygor had a typo...
awk -F: '$2 !~ "\*"' file
When it works, great! Looks fine (but I'm not a awk specialised, you know ;-)
I will test it tomorrow.
Regards,
Martin
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
Besides of the command "passwd" on Solaris and HP-UX and IRIX that allow users to change their passwords on the system. Is there anyother way a user can change his/her own password. Do any of these systems have a GUI interface to allow the user doing so?
Thanks (3 Replies)
Discussion started by: vtran4270
3 Replies
2. UNIX for Advanced & Expert Users
I have to change more then 200 User at once
the password (security-dday).
The programm passwd will answers (new password + again)
How can i do this in a script?
thanks for answers (5 Replies)
Discussion started by: Erwin Stocker
5 Replies
3. UNIX for Dummies Questions & Answers
hello,
I don't why I can't change the password, when ever I try to run passwd I get the problem??!!!
unixws1:ldb> passwd
passwd: Changing password for ldb
Permission denied
regards,
me (2 Replies)
Discussion started by: geoquest
2 Replies
4. UNIX for Dummies Questions & Answers
Can anyone explain the second and third fields in /etc/passwd.
Thanks. (2 Replies)
Discussion started by: nguda
2 Replies
5. Shell Programming and Scripting
Hello All
I want to print only the full name from the /etc/passwd file and print it to the screen .
Could you please let me know how can I do that? (4 Replies)
Discussion started by: supercops
4 Replies
6. Solaris
Hi Folks,
I have Solaris 10, latest release.
We have passwd aging set in /etc/defalut/passwd.
I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging.
When I reset the users passwd using passwd command, it re enables... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies
7. UNIX for Dummies Questions & Answers
Hello ,
how to open utemp,getpwuid files.I know what info these files will carry but i dont know ow to open see the info present in it.
Thanks to help. (4 Replies)
Discussion started by: kkalyan
4 Replies
8. UNIX for Dummies Questions & Answers
Hi!
i've been searching a way to display the users who are in the /etc/passwd directory...using ls or grep or cat command should do it?i can't find a way to get this right..i mean none of the preview commands function sounded good to me to use... (9 Replies)
Discussion started by: strawhatluffy
9 Replies
9. AIX
Does anyone know when AIX started using /etc/security/passwd instead of /etc/passwd to store encrypted passwords? (1 Reply)
Discussion started by: Anne Neville
1 Replies
10. UNIX for Dummies Questions & Answers
Hi Folks,
I have a text file with lots of rows with duplicates in the first column, i want to filter out records based on filter columns in a different filter text file.
bash scripting is what i need.
Data.txt
Name OrderID Quantity
Sam 123 300
Jay 342 498
Kev 78 2500
Sam 420 50
Vic 10... (3 Replies)
Discussion started by: tech_frk
3 Replies
LEARN ABOUT REDHAT
endpwent
GETPWENT(3) Linux Programmer's Manual GETPWENT(3)
NAME
getpwent, setpwent, endpwent - get password file entry
SYNOPSIS
#include <pwd.h>
#include <sys/types.h>
struct passwd *getpwent(void);
void setpwent(void);
void endpwent(void);
DESCRIPTION
The getpwent() function returns a pointer to a structure containing the broken out fields of a line from /etc/passwd. The first time it is
called it returns the first entry; thereafter, it returns successive entries.
The setpwent() function rewinds the file pointer to the beginning of the /etc/passwd file.
The endpwent() function closes the /etc/passwd file.
The passwd structure is defined in <pwd.h> as follows:
struct passwd {
char *pw_name; /* user name */
char *pw_passwd; /* user password */
uid_t pw_uid; /* user id */
gid_t pw_gid; /* group id */
char *pw_gecos; /* real name */
char *pw_dir; /* home directory */
char *pw_shell; /* shell program */
};
RETURN VALUE
The getpwent() function returns the passwd structure, or NULL if there are no more entries or an error occurs.
ERRORS
ENOMEM Insufficient memory to allocate passwd structure.
FILES
/etc/passwd
password database file
CONFORMING TO
SVID 3, BSD 4.3
SEE ALSO
fgetpwent(3), getpwnam(3), getpwuid(3), getpw(3), putpwent(3), passwd(5)
GNU
1996-05-27 GETPWENT(3)