How can I list user's detail info, like group, gecos, login shell, etc., in solaris.
I know the /etc/passwd file have them all, but what I need is a command.
Thanks.
I know the /etc/passwd file have them all, but what I need is a command.
Thanks.
> I know the /etc/passwd file have them all, but what I need is a command.
--
.-. .-. Errors have been made. Others will be blamed.
(_ \ / _)
|
grep <username> /etc/passwd.Quote:> How can I list user's detail info, like group, gecos, login shell, etc., in solaris.
> I know the /etc/passwd file have them all, but what I need is a command.
--
Rich Teer
President,
Rite Online Inc.
Voice: +1 (250) 979-1638
URL: http://www.rite-online.net
> How can I list user's detail info, like group, gecos, login shell, etc., in solaris.
> I know the /etc/passwd file have them all, but what I need is a command.
grep username /etc/passwd
will show you lines containing that username - you can start getting
fancy with constructions like
grep "^username" /etc/passwd
if you want to see only lines starting with that username - to avoid
things like
grep username /etc/passwd
foo:x:9999:123:My very own username:/home/blah:
If you want to split the lines up like
username: boggly
uid: 12345
gid: 65
gcos: Boggly the user
home: /home/bogglyplace
shell: /bin/ash
then Perl or awk are probably the best tools to use to write a script to
do it - there's no built-in command for this.
--
Tony
# logins -axl joeuser
ajcaines 1005 staff 10 Joe User, Users Group, x1234
/home/joeuser
/bin/csh
PS 091100 -1 -1 -1
-1 000000
# id -a joeuser
uid=1005(joeuser) gid=10(staff) groups=80(www)
# finger joeuser
Login name: joeuser In real life: Joe User
Directory: /home/joeuser Shell: /bin/csh
On since Nov 9 09:56:55 on pts/5 from some.other.system
Mail last read Sat Nov 10 03:40:00 2001
Project: The Users Project
Plan:
To make the sysadmin's life a misery.
-Andrew-
--
_______________________________________________________________________
| "They that can give up essential liberty to obtain a little temporary |
| safety deserve neither liberty nor safety" - Benjamin Franklin, 1759 |
1. List of plug-ins for linux/netscape please!
Hi,
Would someone please post (or e-mail) a complete list of
plugin names for netscape navigator under linux? Together with a list
of filetypes that they should be used with? And how to get netsape to
recognize them?
Thanks very much.
Hari.
3. **** Info about Computer Break ins and Hacking ****
4. ntp broadcast client question
5. Computer Break ins and Hacking Info?
7. Solaris SW list: More program info needed
8. CDROM keeps ejecting 1.1.45
9. Need HELP to Log User Log-ins form the internet
10. LOCAL/MAILING-LIST: Mailing list for Greek Linux Users
11. MAILING-LIST: new Cyclades Users mailing list
12. LOCAL/MAILING-LIST: Mailing list for Greek Linux Users