|
From: Terry D. <td...@bi...> - 2001-11-19 02:30:51
|
ok, i am defective.......for some reason it works now.......SECONDARY
returns the GID of the groups......not the names, is this correct ?
sorry about the idiocies.... :)
Terry Davis wrote:
> Hrm, I am not seeing secondary groups then..........here is my code mr
> perl god. :) These are just the relavent parts.....
>
> #!/usr/bin/perl
> use Net::LDAP;
> use Mail::Sendmail;
>
> $action = "$ENV{ 'USERADMIN_ACTION' }";
> $username = "$ENV{ 'USERADMIN_USER' }";
> $uid = "$ENV{ 'USERADMIN_UID' }";
> $name = "$ENV{ 'USERADMIN_REAL' }";
> $home = "$ENV{ 'USERADMIN_HOME' }";
> $shell = "$ENV{ 'USERADMIN_SHELL' }";
> $pass = "$ENV{ 'USERADMIN_PASS' }";
> $group = "$ENV{ 'USERADMIN_USER' }";
> $group2 = "$ENV{ 'USERADMIN_SECONDARY' }";
>
> if ( $action eq 'CREATE_USER' ){
>
> my %mail = ( To => 'ad...@bi...',
> From => 'te...@bi...',
> Message => "$group,$group2"
> );
> sendmail(%mail) or die $Mail::Sendmail::error;
>
> create_user();
> exit 0;
> }
>
>
> That email contains nothing........except the main group name....no
> secondary groups.
> Thank you!
>
>
>
>
> Jamie Cameron wrote:
>
>> Secondary groups can be gotten from $ENV{'USERADMIN_SECONDARY'}, and on
>> systems where a new group is created for the new user, it's name will be
>> the same as $ENV{'USERADMIN_USER'} and it's GID will be
>> $ENV{'USERADMIN_GID'}
>>
>> - Jamie
>>
>> Terry Davis wrote:
>>
>>> Yes, I am seeing stuff in:
>>> $action = "$ENV{ 'USERADMIN_ACTION' }";
>>> $username = "$ENV{ 'USERADMIN_USER' }";
>>> $uid = "$ENV{ 'USERADMIN_UID' }";
>>> $name = "$ENV{ 'USERADMIN_REAL' }";
>>> $home = "$ENV{ 'USERADMIN_HOME' }";
>>> $shell = "$ENV{ 'USERADMIN_SHELL' }";
>>> $pass = "$ENV{ 'USERADMIN_PASS' }";
>>>
>>> Sorry about the assignments, I am being lazy, you get the point
>>> though. :)
>>>
>>> I am seeing values in all of those fields. I do see the members of
>>> the group
>>> though as you said.
>>>
>>> Here is what I was looking for. When I create a new user, under
>>> Redhat, you
>>> create a new group of that username. I want that stored in an ENV
>>> var somehow
>>> as well as any secondary groups that are selected on that screen as
>>> well.
>>>
>>> Thank you!
>>>
>>> --
>>> Terry Davis
>>> Systems Administrator
>>> BirdDog Solutions, Inc.
>>> (402) 829-6059
>>>
>>> Quoting Jamie Cameron <jca...@we...>:
>>>
>>>> Terry Davis <td...@bi...> wrote ..
>>>>
>>>>> Hello!
>>>>>
>>>>> When I create a new user, there is a new group field that I want an
>>>>> environment variable for. I know there are these:
>>>>> $ENV{ 'USERADMIN_GROUP' }
>>>>> $ENV{ 'USERADMIN_SECONDARY' }
>>>>> $ENV{ 'USERADMIN_GID' }
>>>>>
>>>>> But none of those seem to contain anything when I create a new user.
>>>>>
>>>>> I am using version 0.88 on Redhat 7.1.
>>>>> Any ideas?
>>>>>
>>>> Assuming you are writing a perl script that is set in the module
>>>> config to
>>>> be run after changes are made, $ENV{'USERADMIN_GID'} should contain
>>>> the gid
>>>> of the new users primary group. Are you seeing anything in any of the
>>>> environment
>>>> variables?
>>>>
>>>> - Jamie
>>>>
>>
>> -
>> Forwarded by the Webmin development list at web...@we...
>> To remove yourself from this list, go to
>> http://lists.sourceforge.net/lists/listinfo/webadmin-devel
>>
>
>
>
>
> -
> Forwarded by the Webmin development list at web...@we...
> To remove yourself from this list, go to
> http://lists.sourceforge.net/lists/listinfo/webadmin-devel
|