* useradd
@ 2000-12-20 19:49 Arnie Miles
0 siblings, 0 replies; 3+ messages in thread
From: Arnie Miles @ 2000-12-20 19:49 UTC (permalink / raw)
To: tru64-unix-managers
All:
I'm trying to use "useradd" (with a number of options listed in the man
pages) in a loop in a Perl script to create a batch of accounts.
Unfortunately, it doesn't seem to allow me to just put in a password at the
same time, it appears to want to interact with the keyboard for each
password to be typed in twice.
I know that if I don't set a password, it will create the account with no
password, but that is a less than satisfactory solution.
Does anyone have a solution that will allow me to enter a password while
creating an account from a script that does not require keyboard input?
My e-mail address is miles@hood.edu
Thanks...
Arnie Miles
Manager, End User Computing
Unix Systems Administrator
Hood College
Frederick, MD 21701
^ permalink raw reply [flat|nested] 3+ messages in thread
* useradd
@ 2000-12-21 13:46 Arnie Miles
0 siblings, 0 replies; 3+ messages in thread
From: Arnie Miles @ 2000-12-21 13:46 UTC (permalink / raw)
To: tru64-unix-managers
Original question is below.
I had some excellent responses to my request for help with Perl and useradd.
My thanks go out to:
Chewy
Elizabeth Harvey
J.A. Gutierrez
Larry Clegg
John Tan
J Bacher
Jim Fitzmaurice
Alan Davis
Matt Moore
and Jerome Berkman
While one person actually sent me a script that he is using, most people
recommended that I incorporate the use of a call to "expect" into my
program. On first look, the script I got seems to be actually editing the
passwd file directly, and using crypt() to directly insert the passwords.
Another person suggested that I attempt the same thing in my own script.
The last suggestion that just snuck in under the wire was:
open(A, "/path/to/useradd|");
print A "$passwd\n$passwd\n";
However, is it useradd that is calling for the password at that point, or
something else? In other words, if you invoke useradd with a -p switch,
what is calling for the password?
I am still deciding how comfortable I am with writing directly to
/etc/passwd in a script. In the meantime, I am researching Expect, and will
be downloading it later this morning.
thanks all,
Arnie Miles
All:
I'm trying to use "useradd" (with a number of options listed in the man
pages) in a loop in a Perl script to create a batch of accounts.
Unfortunately, it doesn't seem to allow me to just put in a password at the
same time, it appears to want to interact with the keyboard for each
password to be typed in twice.
I know that if I don't set a password, it will create the account with no
password, but that is a less than satisfactory solution.
Does anyone have a solution that will allow me to enter a password while
creating an account from a script that does not require keyboard input?
My e-mail address is miles@hood.edu
Thanks...
Arnie Miles
Manager, End User Computing
Unix Systems Administrator
Hood College
Frederick, MD 21701
^ permalink raw reply [flat|nested] 3+ messages in thread
* useradd
@ 2001-01-04 14:43 Arnie Miles
0 siblings, 0 replies; 3+ messages in thread
From: Arnie Miles @ 2001-01-04 14:43 UTC (permalink / raw)
To: tru64-unix-managers
All:
I ran into a problem, and I want to see if anyone has any thoughts on it.
My machine (Tru64 v4.0f) has /var, /usr, and /http partitions (they are
separate mount points) on one drive. It also has a variety of other mount
points on other drives and arrays. A rogue process ran over the break and
filled up /var with a file of approximately 2 gigs. The machine reported
that /var, /usr, and /http were full until I deleted this file from /var, at
which time all three filesystems reported their correct sizes. None of the
other drives reported full. If it matters, I am using AdvFs on almost
everything.
Any thoughts on the matter would be appreciated.
By the way, I summarized my responses from my last request for information
on creating accounts from a text file and a script, in that most people
recommended using Expect. When I get the script done, I will let everyone
know in case they would like a copy.
My e-mail address is miles@hood.edu
Thanks...
Arnie Miles
Manager, End User Computing
Unix Systems Administrator
Hood College
Frederick, MD 21701
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-01-04 14:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-21 13:46 useradd Arnie Miles
-- strict thread matches above, loose matches on Subject: below --
2001-01-04 14:43 useradd Arnie Miles
2000-12-20 19:49 useradd Arnie Miles
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox