Skip to content

Instantly share code, notes, and snippets.

View ymirpl's full-sized avatar

Marcin Mincer ymirpl

View GitHub Profile
#!/usr/bin/perl
use warnings;
use strict;
# args: login shell
sub change_shell {
my $username = shift;
my $shell = shift;
my @command = ("chsh", "-s ".$shell, $username );
system(@command) or print STDERR "Failed to chsh";