Changeset View
Changeset View
Standalone View
Standalone View
head/usr.bin/getent/getent.1
Show All 23 Lines | |||||
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
.\" POSSIBILITY OF SUCH DAMAGE. | .\" POSSIBILITY OF SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd June 4, 2016 | .Dd October 24, 2020 | ||||
.Dt GETENT 1 | .Dt GETENT 1 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm getent | .Nm getent | ||||
.Nd get entries from administrative database | .Nd get entries from administrative database | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Ar database | .Ar database | ||||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
The | The | ||||
.Nm | .Nm | ||||
utility exits 0 on success, | utility exits 0 on success, | ||||
1 if there was an error in the command syntax, | 1 if there was an error in the command syntax, | ||||
2 if one of the specified key names was not found in | 2 if one of the specified key names was not found in | ||||
.Ar database , | .Ar database , | ||||
or 3 if there is no support for enumeration on | or 3 if there is no support for enumeration on | ||||
.Ar database . | .Ar database . | ||||
.Sh EXAMPLES | |||||
Show entry for user sshd from the passwd database: | |||||
.Bd -literal -offset indent | |||||
$ getent passwd sshd | |||||
sshd:*:22:22:Secure Shell Daemon:/var/empty:/usr/sbin/nologin | |||||
.Ed | |||||
.Pp | |||||
Show entry for TCP from the protocols database: | |||||
.Bd -literal -offset indent | |||||
$ getent protocols tcp | |||||
tcp 6 TCP | |||||
.Ed | |||||
.Pp | |||||
Show entry for the localhost IPv6 address ::1 from the hosts database: | |||||
.Bd -literal -offset indent | |||||
$ getent hosts ::1 | |||||
::1 localhost localhost.my.domain | |||||
.Ed | |||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr getutxent 3 , | .Xr getutxent 3 , | ||||
.Xr ethers 5 , | .Xr ethers 5 , | ||||
.Xr group 5 , | .Xr group 5 , | ||||
.Xr hosts 5 , | .Xr hosts 5 , | ||||
.Xr netgroup 5 , | .Xr netgroup 5 , | ||||
.Xr networks 5 , | .Xr networks 5 , | ||||
.Xr nsswitch.conf 5 , | .Xr nsswitch.conf 5 , | ||||
.Xr passwd 5 , | .Xr passwd 5 , | ||||
.Xr protocols 5 , | .Xr protocols 5 , | ||||
.Xr rpc 5 , | .Xr rpc 5 , | ||||
.Xr services 5 , | .Xr services 5 , | ||||
.Xr shells 5 | .Xr shells 5 | ||||
.Sh HISTORY | .Sh HISTORY | ||||
A | A | ||||
.Nm | .Nm | ||||
command appeared in | command appeared in | ||||
.Nx 3.0 , | .Nx 3.0 , | ||||
and was imported into | and was imported into | ||||
.Fx 7.0 . | .Fx 7.0 . | ||||
It was based on the command of the same name in | It was based on the command of the same name in Solaris and Linux. | ||||
.Tn Solaris | |||||
and | |||||
.Tn Linux . |