- addUser(user: {
groups?: string[];
home?: string;
name?: string;
password?: string;
primaryGroup?: string;
shell?: {
isCustom: boolean;
isShellObj: boolean;
name: string;
path: string;
};
user: string;
}, existingUsers: string[]): Promise<{
error: string;
message?: undefined;
success: boolean;
} | {
error?: undefined;
message: string;
success: boolean;
}> Parameters
- user: {
groups?: string[];
home?: string;
name?: string;
password?: string;
primaryGroup?: string;
shell?: {
isCustom: boolean;
isShellObj: boolean;
name: string;
path: string;
};
user: string;
}Optional
groups?: string[]
Optional
home?: string
Optional
name?: string
Optional
password?: string
Optional
primaryGroup?: string
Optional
shell?: {
isCustom: boolean;
isShellObj: boolean;
name: string;
path: string;
}
isCustom: boolean
isShellObj: boolean
name: string
path: string
user: string
- existingUsers: string[]
Returns Promise<{
error: string;
message?: undefined;
success: boolean;
} | {
error?: undefined;
message: string;
success: boolean;
}>
- Success or error message.
Adds a new user.