systemUserExists

Check if system user with specified name exists

version(Posix)
@trusted
bool
systemUserExists
(
in string username
)

Parameters

username string

name of user to check if exists

Return Value

Type: bool

True if such user exists, otherwise false.

Examples

import unit_threaded.assertions;

systemUserExists("root").shouldBeTrue;
systemUserExists("this_user_definitely_does_not_exist_xyzzy").shouldBeFalse;

Meta