Thread View: comp.sys.next.sysadmin
2 messages
2 total messages
Started by robert cyphers
Sat, 05 Sep 1992 14:54
'nu -A' question
Author: robert cyphers
Date: Sat, 05 Sep 1992 14:54
Date: Sat, 05 Sep 1992 14:54
14 lines
655 bytes
655 bytes
I want to call the command nu -A name realname uid gid shell pwd home reuse mh domain to install new users from inside a program. My problem is: Can I get 'nu -A' to accept "*" as a password with the usual meaning, i.e. login disabled? Also, should 'reuse' and 'mh' be N/Y or 0/1? Thanks. Robert C Cyphers rcc@next1.math.pitt.edu
Re: 'nu -A' question
Author: Sherwood Botsford
Date: Tue, 15 Sep 1992 00:04
Date: Tue, 15 Sep 1992 00:04
48 lines
2082 bytes
2082 bytes
robert cyphers writes
> I want to call the command
> nu -A name realname uid gid shell pwd home reuse mh
domain
> to install new users from inside a program.
>
> My problem is:
>
> Can I get 'nu -A' to accept "*" as a password with the
usual meaning,
> i.e. login disabled?
Nope. Think about it. Nu is going to use whatever you
type in, run crypt on it, and stuff THAT string into the
/etc/passwd (or netinfo ) file. Alternately, it will feed
the string to passwd, and passwd should barf, because it's
too short. Entering it on the command line too, you would
have to protect it from globbing.
HOWEVER
You can get around this by modifying the DeleteAccts shell.
Since nu is a binary that calls the script, I don't see a
way to make it call it with extra variables. But you could
have DeleteAccts check an environment variable, and based
on that either delete the account or merely disable it. (I
would tend to modify the script so that disableing the
account was default, deleting it required the extra
variable.
Make that script make a series of calls to niutil to change
the passwd from sdkfjqp712047612 to *sdkfjqp712047612. (*
never comes up as the result of encrypting the password,
and this way, you can remove the * and his old password
works)
>
> Also, should 'reuse' and 'mh' be N/Y or 0/1?
You want an integer.
From /etc/nulib/nu2.sh:
if ($wantMHsetup) then
mkdir Mail
mkdir Mail/inbox
...
see also /etc/nu.cf
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads