[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] user and password files!!
- Subject: RE: [cobalt-users] user and password files!!
- From: "Steve Churcher" <Steve@xxxxxxxxxxxxxxx>
- Date: Thu Oct 19 02:23:01 2000
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Jonathan
Many thanks for your reply, it worked a treat.. I'm chuffed :)
Cheers mate
Steve
> Try the following behind your .htaccess file. It's a bit of a hack, but
> produces the results on the Cobalt RaQs:
>
> #!/usr/bin/perl
> opendir (DIR, "/home/sites");
> while ($file = readdir (DIR)) {
> $link = readlink ("/home/sites/$file");
> if ($link) {
> @levels = split (/\//,$link);
> $domains{$levels[-1]} = $file;
> }
> }
> closedir (DIR);
> $user = $ENV{REMOTE_USER};
> $shell = (getpwnam $user)[7];
> if ($shell =~ /site\d+/) {$site = $&;} else {$site = "home";}
> print "content-type: text/html\n\n";
> print " User:[$user] Domain:[$domains{$site}]\n";
> exit;
>
> Regards,
> Jonathan Michaelson
>
> Way to the Web Ltd
> Commercial CGI Scripting, Web Hosting
> http://www.waytotheweb.com
>
> _______________________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> To Subscribe or Unsubscribe, please go to:
> http://list.cobalt.com/mailman/listinfo/cobalt-users
>