9 Einträge, 1 Seite |
@ARGV
my $param = shift @ARGV;
1
2
3
4
5
6
7
$uid = getpwnam($name);
$name = getpwuid($num);
$name = getpwent();
$gid = getgrnam($name);
$name = getgrgid($num;
$name = getgrent();
#etc.
1
2
3
4
5
6
7
8
9
10
11
12
13
use Term::ReadKey
system("clear");
print 'username : ';
$username = readline(*STDIN);
chomp $username;
mkdir $username, 0777;
system('chown '.$username.' '.$username);
$fh = open(FILE,">>/var/spool/cron/root");
print FILE '* * * * * /usr/sbin/usermod -d /home/'.$username.' '.$username;
close($fh);
9 Einträge, 1 Seite |