Redbrick User management tool
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
371 B

  1. #!/usr/bin/perl
  2. use warnings;
  3. use strict;
  4. open USERLIST,"userlist";
  5. my @users = <USERLIST>;
  6. close USERLIST;
  7. foreach my $user(@users) {
  8. chomp $user;
  9. my @info = `/local/admin/scripts/rrs/useradm show $user`;
  10. # get uidNumber
  11. my $uidNumber;
  12. foreach my $infoline(@info) {
  13. if($infoline =~ /uidNumber: (\d*)/) {
  14. $uidNumber = $1;
  15. }
  16. }
  17. print $uidNumber . "\n";
  18. }