mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 03:07:43 +02:00
samba: Remove option to chose user group and shell
There is no need for this being implemented and it is dangerous to allow the user to create any shell accounts or users that belong to groups with higher privileges. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -79,7 +79,7 @@ int main(int argc, char *argv[]) {
|
||||
snprintf(command, BUFFER_SIZE-1, "/usr/sbin/groupadd sambauser >/dev/null");
|
||||
safe_system(command);
|
||||
|
||||
snprintf(command, BUFFER_SIZE-1, "/usr/sbin/useradd -c 'Samba User' -m -g %s -s %s %s >/dev/null", argv[4], argv[5], argv[2]);
|
||||
snprintf(command, BUFFER_SIZE-1, "/usr/sbin/useradd -c 'Samba User' -m -g sambauser -s /bin/false %s >/dev/null", argv[2]);
|
||||
safe_system(command);
|
||||
|
||||
snprintf(command, BUFFER_SIZE-1, "echo %s:%s | chpasswd", argv[2], argv[3]);
|
||||
|
||||
Reference in New Issue
Block a user