Date: Tue, 14 Apr 1998 19:41:51 +0930 From: Greg Lehey <grog@lemis.com> To: "Stephen A. Derdau" <sderdau@xtdl.com> Cc: Frank Griffith <frankg@idfw.com>, freebsd-questions@FreeBSD.ORG Subject: Re: List of Users Message-ID: <19980414194151.X1870@freebie.lemis.com> In-Reply-To: <Pine.BSF.3.91.980414060835.27008A-100000@user.xtdl.com>; from Stephen A. Derdau on Tue, Apr 14, 1998 at 06:10:59AM -0400 References: <19980414123049.B17151@freebie.lemis.com> <Pine.BSF.3.91.980414060835.27008A-100000@user.xtdl.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 14 April 1998 at 6:10:59 -0400, Stephen A. Derdau wrote: > On Tue, 14 Apr 1998, Greg Lehey wrote: > >> On Mon, 13 April 1998 at 21:22:31 -0500, Frank Griffith wrote: >>> I need to see what users accounts have been >>> setup on my FreeBSD machine. I don't seem >>> to be able to do that. LISTUSER does not >>> seem to be a command available to me. Can >>> someone steer me right. >> >> The traditional way is to look with vipw, or look at the file >> /etc/passwd. I don't know of any specific utility to list them, but >> you could make one easily enough. > > If all your users are under say /usr/homes > do ls -al /usr/homes > user.text That's the big *if*. This doesn't really tell you your users, it tells you user home directories. Compare: $ cat /etc/passwd root:*:0:0:Charlie &:/root:/bin/bash toor:*:0:0:Bourne-again Superuser:/root: daemon:*:1:31:Owner of many system processes:/root: operator:*:2:20:System &:/usr/guest/operator:/bin/csh bin:*:3:7:Binaries Commands and Source,,,:/:/nonexistent games:*:7:13:Games pseudo-user:/usr/games: news:*:8:8:News Subsystem:/:/nonexistent man:*:9:9:Mister Man Pages:/usr/share/man: uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico xten:*:100:100:X-10 daemon:/usr/local/xten:/nonexistent ingres:*:267:74:& Group:/usr/ingres:/bin/csh nobody:*:65534:65534:Unprivileged user:/nonexistent:/nonexistent grog:*:1004:1000:Greg Lehey, Echunga, +61-8-8388-8250:/home/grog:/bin/bash norm:*:1021:1001:Norman Lehey, Schellnahausen, +49-6637-919126:/home/norm:/bin/bash velte:*:2000:31:Jack Velte:/home/velte:/bin/bash andreas:*:1020:31:Andreas Ritter:/home/andreas:/bin/bash ctm:*:1024:0:Dummy user for CTM:/src/ctm:/bin/bash yana:*:1000:1001:Yana Lehey:/home/yana:/bin/bash jkr:*:110:31:Juergen Krause:/home/jkr:/bin/bash guest:*:1111:31:Any guest:/home/guest:/bin/bash bsd:*:1001:1000:BSD Checkin:/home/bsd:/bin/bash ftp:*:50:32766:Anonymous FTP,,,:/var/spool/ftp:/dev/null yvonne:*:1005:1001:Yvonne Lehey, Echunga, +61-8-8388-8250:/home/yvonne:/bin/bash yana:*:1006:1001:Yana Lehey:/home/yana:/bin/bash guest:*:1007:3000:A. N. Other (somewhere in the world):/home/guest: postgres:*:70:70:Postgres95 pseudo-user:/usr/local/postgres95:/bin/sh class:*:1002:1002:Motorola TCP/IP class at Qinghua University:/home/class:/bin/bash $ ls /home Book class grog nanyang norm vinum This is a real-life example (and an indication I need to tidy up things on my laptop). You'll notice that /etc/passwd also gives you a lot more information. Greg -- See complete headers for address and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980414194151.X1870>