[Wien] Multiple users & w2web

Jeff Spirko spirko at lehigh.edu
Thu Oct 28 16:17:51 CEST 2004


Oops, forgot to attach.

On Thu, Oct 28, 2004 at 10:11:21AM -0400, Jeff Spirko wrote:
> The attached perl program generates the text needed to add a user to
> w2web.  Once the program is run, take the last line of output and
> add it to your w2web.users file, wherever that is.  (Under your
> $HOME directory, in .w2web/$(hostname -f)/conf directory, probably.)
> 
> -Jeff Spirko
> 
> On Thu, Oct 28, 2004 at 09:53:26AM -0400, Jeff Spirko wrote:
> > It is possible, I think.  A perl person would be able to do it
> > easily.
> > 
> > But, all of the jobs will be "owned" (in the Unix sense) by the user
> > who started the w2web server.  That usually means that other WIEN2k
> > users will not be able to view and manipulate the job files without
> > opening them up to all users on the machine, a security nightmare.
> > 
> > It's probably better to have separate WIEN2k installations for each
> > user.  This means different ports for each w2web.  But currently,
> > WIEN2k installs itself with all source and binaries in the same
> > place, which is many megabytes of stuff.  It is possible to create a
> > "binary-only" installation by copying the files from the $WIENROOT
> > directory and the $WIENROOT/w2web subdirectory.  It might be
> > possible to make a "w2web-only" installation that links to binaries
> > that someone else installed, while copying the w2web stuff.
> > 
> > -Jeff Spirko
> > 
> > On Thu, Oct 28, 2004 at 06:50:08AM -0500, L. D. Marks wrote:
> > > Has anyone worked out a way of having multiple users with different
> > > names/passwords use w2web via port 7890 (so as not to have multiple ports
> > > open)?
> > > 
> > > -----------------------------------------------
> > > Laurence Marks
> > > Department of Materials Science and Engineering
> > > MSE Rm 2036 Cook Hall
> > > 2225 N Campus Drive
> > > Northwestern University
> > > Evanston, IL 60201, USA
> > > Tel: (847) 491-3996 Fax: (847) 491-7820
> > > mailto:L-marks at northwestern.edu
> > > http://www.numis.northwestern.edu
> > 
> > -- 
> > Jeff Spirko   spirko at lehigh.edu   spirko at yahoo.com   WD3V   |=>
> > 
> > The study of non-linear physics is like the study of non-elephant biology.
> > 
> > All theoretical chemistry is really physics;
> > and all theoretical chemists know it. -- Richard P. Feynman 
> > 
> > _______________________________________________
> > Wien mailing list
> > Wien at zeus.theochem.tuwien.ac.at
> > http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> 
> -- 
> Jeff Spirko   spirko at lehigh.edu   spirko at yahoo.com   WD3V   |=>
> 
> http://spirko.blogspot.com/
> 
> The study of non-linear physics is like the study of non-elephant biology.
> 
> All theoretical chemistry is really physics;
> and all theoretical chemists know it. -- Richard P. Feynman 
> 
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien

-- 
Jeff Spirko   spirko at lehigh.edu   spirko at yahoo.com   WD3V   |=>

http://spirko.blogspot.com/

The study of non-linear physics is like the study of non-elephant biology.

All theoretical chemistry is really physics;
and all theoretical chemists know it. -- Richard P. Feynman 
-------------- next part --------------
#!/usr/bin/perl

print <<__HEADER__;
#######################################################################
# w2web user creator                                                  #
# Written 10/28/04 by Jeff Spirko                                     #
# based on w2web from WIEN2k, Copyright (C) 2001 luitz.at             #
#######################################################################
__HEADER__

sub Input {
        print "$_[0]: [$_[1]] ";
        $input = <STDIN>;
        chop($input);
        if ($input eq "") {
                return $_[1];
        } else {
                return $input;
        }
}
@chars = ('a'..'z', 'A'..'Z', 0..9);

$User     = Input("Please enter the new username", "newuser");
$Password = Input("Please enter the password", "password");

if(length($Password) > 13) {
        $ok=0;
        $msg = "WARNING: password is too long!";
}

if ($Password =~ /[\W]/) {
        $ok=0;
        $msg = "WARNING: password contains invalid chars!";
}

if ($Password !~ /[a-zA-Z]/ || $Password !~ /[\d]/ || length($Password) < 6) {
        $msg = "Warning: password isn't very secure!";
}

$Password = crypt($Password, $chars[rand(@chars)].$chars[rand(@chars)]);

print "Add the following line to your w2web.users file:\n";
print "$User:$Password\n";


More information about the Wien mailing list