10-31-2007
create users from template
Create users from template file
Last edited by rijeshpp; 11-02-2007 at 10:43 AM..
10 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
I new to unix and I'm using a HP UX and I'm logging in as user: root. I wish to create new users by using the 'useradd' command.
When I keyed in' useradd -u 101 -g group john', the reply was 'Group group specified with -g does not exist'.
I've read the man page on useradd and I still don't... (8 Replies)
Discussion started by: mascotlee
8 Replies
2. Solaris
Hi Friends,,
I installed solaris 10 in vmware just now.I got a simple problem while i want to create users in /home directory.It is saying "cannot create ".So i checked the permission and then i find that the perm to user(root) is r-x.So i tried to change it to rwx using chmod but again i got a... (4 Replies)
Discussion started by: sdspawankumar
4 Replies
3. Solaris
How to create users in NIS server in solaris
Thanks in Advance (6 Replies)
Discussion started by: durgaprasadr13
6 Replies
4. Shell Programming and Scripting
Hi ,
i would like to create a new user over unix ,which are these commands to used and which are the directories to handler?
Thank you (3 Replies)
Discussion started by: dimitris
3 Replies
5. Programming
Hi,
I have XML file and I extracted some tags and stored in hash, my data as look like this
$var1={
'stud.xml'={
'24'=>'<address>
<streetname="xxxx"/>
<housenum="138"/">
... (9 Replies)
Discussion started by: veerubiji
9 Replies
6. Shell Programming and Scripting
I write lots of SAS programs and would like to create a script that allows me to have a template each time I create a new program file.
Specs:
I use EVIM for my editor. I run SAS in batch mode. We use RedHat 6.
I don't use c shell.
I want a script that will do the following:
>... (3 Replies)
Discussion started by: starbecks
3 Replies
7. Shell Programming and Scripting
Hello Forum,
I just wrote a bash script to create users remotely from a file.
When I run the script localy, it work nice.
But when I run it using rsh it stops.
My script is:
#!/bin/bash
1|cat /root/usuarios.txt | while read line; do
2| /usr/sbin/adduser $line
3| echo... (4 Replies)
Discussion started by: cachorroyayo
4 Replies
8. Shell Programming and Scripting
hi,
i am new to shell scripts
i write a shell script to create multiple users but i need to give passwords to that users while creating users, command to write this script (1 Reply)
Discussion started by: DONFOX
1 Replies
9. Red Hat
I have an Oracle Linux 7.1 vsphere host built. It's be preconfigured with our security configurations.
What I would like to do is unconfigure this host. Then set the host to do firstboot --reconfigure.
how do I do that using /etc/sysconfig/firstboot?
I've tried setting
... (10 Replies)
Discussion started by: os2mac
10 Replies
10. Shell Programming and Scripting
Source File:
google.cz http://czechrepublic.google.com/
http://czechrepublic.google.cz http://czechrepublic.google.com/
http://brno.google.cz http://brno.google.com/
Fail Code
root@arisvm ~/g] $ cat trya
rm -f ss
for i in a.txt
do
#b=`cat $i|awk '{print $1}'`
#c=`cat $i|awk '{print... (4 Replies)
Discussion started by: invinzin21
4 Replies
LEARN ABOUT DEBIAN
template::provider::fromdata
Template::Provider::FromDATA(3pm) User Contributed Perl Documentation Template::Provider::FromDATA(3pm)
NAME
Template::Provider::FromDATA - Load templates from your __DATA__ section
SYNOPSIS
use Template;
use Template::Provider::FromDATA;
# Create the provider
my $provider = Template::Provider::FromDATA->new( {
CLASSES => __PACKAGE__
} );
# Add the provider to the config
my $template = Template->new( {
# ...
LOAD_TEMPLATES => [ $provider ]
} );
# Render a template
$template->process( 'mytemplate', { bar => 'Bar' } );
# ...and now the templates
__DATA__
__mytemplate__
Foo [% bar %]
__myothertemplate__
Baz, [% qux %]?
DESCRIPTION
This module allows you to store your templates inline with your code in the "__DATA__" section. It will search any number of classes
specified.
CAVEAT
If you have two templates with the same name, this module will not understand the difference, it will simply return the first one found. If
you wish, you can specify a fully qualified template name by prefixing the template with the module name (using "-" instead of "::" as a
namespace separator), adding a "/" to separate the module name from the template name.
$template->process( 'My-Templates/mytemplate', { bar => 'Bar' } );
INSTALLATION
perl Makefile.PL
make
make test
make install
METHODS
new( \%OPTIONS )
Create a new instance of the provider. You can specify a list of classes to be searched for templates via the "CLASSES" option. By omitting
this option it will search "main".
# defaults to 'main'
$provider = Template::Provider::FromDATA->new;
# look for templates in 'Foo'
$provider = Template::Provider::FromDATA->new( {
CLASSES => 'Foo'
} );
# look for templates in 'Foo::Bar' and 'Foo::Baz'
$provider = Template::Provider::FromDATA->new( {
CLASSES => [ 'Foo::Bar', 'Foo::Baz' ]
} );
By default, template data is lazy-loaded as they it is requested. If you wish to load up all template data upon initializtion, you can use
the "PRELOAD" option.
$provider = Template::Provider::FromDATA->new( {
PRELOAD => 1
} );
_init( \%OPTIONS )
A subclassed method to handle the options passed to "new()".
fetch( $name )
This is a subclassed method that will load a template via "_fetch()" if a non-reference argument is passed.
_load( $name )
Loads the template via the "get_file()" sub and sets some cache information.
get_file( $class, $template )
This method searches through $class for a template named $template. Returns the contents on success, undef on failure.
This function was mostly borrowed from Catalyst::Helper's "get_file" function.
ACCESSORS
classes
An arrayref of the class names containing our templates.
cache
A hashref of file and template data.
AUTHOR
Brian Cassidy <bricas@cpan.org>
COPYRIGHT AND LICENSE
Copyright 2005-2011 by Brian Cassidy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2011-12-07 Template::Provider::FromDATA(3pm)