
com.anrisoftware.sscontrol.scripts.localuser.LocalChangeUserFactory Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2014-2015 Erwin Müller
*
* This file is part of sscontrol-scripts-unix.
*
* sscontrol-scripts-unix is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* sscontrol-scripts-unix is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
* for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with sscontrol-scripts-unix. If not, see .
*/
package com.anrisoftware.sscontrol.scripts.localuser;
import java.util.List;
import java.util.Map;
import com.anrisoftware.globalpom.exec.runcommands.RunCommands;
import com.anrisoftware.globalpom.threads.api.Threads;
/**
* Factory to create to modify the local user.
*
* @author Erwin Mueller, [email protected]
* @since 1.0
*/
public interface LocalChangeUserFactory {
/**
* Create to modify the local user.
*
* @param args
* the {@link Map} arguments:
*
*
* - {@code command} the change file owner command, for example
* {@code "/usr/sbin/usermod".}
*
*
- {@code userName} the local user name.
*
*
- {@code userId} optionally, the new user ID, for example
* {@code 100}.
*
*
- {@code groupName} optionally, the new group name, for
* example {@code "foo"}.
*
*
- {@code groupId} optionally, the new group ID, for example
* {@code 100}.
*
*
- {@code home} optionally, the new user home directory.
*
*
- {@code shell} optionally, set the new local user login
* shell, for example {@code "/bin/bash".}
*
*
- {@code comment} optionally, set the new local user
* comment, for example {@code "User Foo".}
*
*
- {@code groups} optionally, {@link List} of the local user
* groups, for example {@code "[foo, bar]".}
*
*
- {@code append} optionally, set to {@code true} to append
* the listed groups instead of replacing them.
*
*
- {@code runCommands} optionally, set to the
* {@link RunCommands} to record the command.
*
*
*
* @param parent
* the {@link Object} parent script.
*
* @param threads
* the {@link Threads} pool.
*
* @return the {@link LocalChangeUser}.
*/
LocalChangeUser create(Map args, Object parent,
Threads threads);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy