View Single Post
Old 30th June 2010, 12:05
gilas gilas is offline
Join Date: Jun 2006
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default strange problem adding a new user to a group

Hi "moderator"
thank you for your great work.

I suffering due to a strange problem, here described:

o.s./sw data:
Debian Lenny
ISPConfig Version: 2.2.35

1. I added some code to force ISPConfig to add a news user to a group, for my o.s. is 'www-data'.

2. Looking for the code located in:

line # 534
function add_user_to_group($group, $user = 'admispconfig'){
the user is added correctly and the whole file /etc/group is updated (re-written).
All is ok, I verified it adding after this line:
$mod->file->wf($this->server_conf["group_datei"], $new_group_file);

3. just added a new user to the group create (i.e. web100), through the method:
this code:
$group_file = $mod->file->rf($this->server_conf["group_datei"]);
(then the group file /etc/group is read and saved into the $group_file var)
then I send the var via email:
mail("mymail@mydomain.ext","group file",$group_file);

4. all is ok I receive the whole content without problems and the www-data group is added.

5. some seconds after this I check with the linux command:
groups www-data

the output show (only) for few seconds the group added, i.e.:

www-data web10 web11 web100

6. I repeat the linux command described above (step 5)
and the group added disappeared!

what happens?!?

Thank you very much for your answer, cordially
Reply With Quote
Sponsored Links