Koozali.org: home of the SME Server

An error occurred creating the user. - SOLVED

Offline mmarian

  • *
  • 6
  • +0/-0
An error occurred creating the user. - SOLVED
« on: September 04, 2008, 05:54:24 PM »
Hi,

I want to create a new user but I have the next error: An error occurred creating the user.

The server is 7.3.

The log is:
Sep  4 18:47:06 mail /etc/e-smith/web/panels/manager/cgi-bin/useraccounts[5671]: /home/e-smith/db/accounts: OLD user4=(undefined)
Sep  4 18:47:06 mail /etc/e-smith/web/panels/manager/cgi-bin/useraccounts[5671]: /home/e-smith/db/accounts: NEW user4=
Sep  4 18:47:06 mail /etc/e-smith/web/panels/manager/cgi-bin/useraccounts[5671]: /home/e-smith/db/accounts: OLD user4=
Sep  4 18:47:06 mail /etc/e-smith/web/panels/manager/cgi-bin/useraccounts[5671]: /home/e-smith/db/accounts: NEW user4=user|City|Ottawa|Company|XYZ Corporation|Dept|Main|EmailForward|local|FirstName|user|ForwardAddress||FreeBusy||LastName|user4|PasswordSet|no|Phone|555-5555|Street|123 Main Street|VPNClientAccess|no
Sep  4 18:47:06 mail /etc/e-smith/web/panels/manager/cgi-bin/useraccounts[5671]: /home/e-smith/db/accounts: OLD user.user4=(undefined)
Sep  4 18:47:06 mail /etc/e-smith/web/panels/manager/cgi-bin/useraccounts[5671]: /home/e-smith/db/accounts: NEW user.user4=pseudonym|Account|user4
Sep  4 18:47:06 mail /etc/e-smith/web/panels/manager/cgi-bin/useraccounts[5671]: /home/e-smith/db/accounts: OLD user_user4=(undefined)
Sep  4 18:47:06 mail /etc/e-smith/web/panels/manager/cgi-bin/useraccounts[5671]: /home/e-smith/db/accounts: NEW user_user4=pseudonym|Account|user4
Sep  4 18:47:06 mail esmith::event[5676]: Processing event: user-create user4
Sep  4 18:47:06 mail esmith::event[5676]: Running event handler: /etc/e-smith/events/user-create/S04user-create-unix
Sep  4 18:47:06 mail esmith::event[5676]: String found where operator expected at /etc/e-smith/events/user-create/S04user-create-unix line 82, near "5   "-m"" 
Sep  4 18:47:06 mail esmith::event[5676]:    (Missing operator before    "-m"?) 
Sep  4 18:47:06 mail esmith::event[5676]: syntax error at /etc/e-smith/events/user-create/S04user-create-unix line 82, near "5   "-m"" 
Sep  4 18:47:06 mail esmith::event[5676]: Execution of /etc/e-smith/events/user-create/S04user-create-unix aborted due to compilation errors. 
Sep  4 18:47:06 mail esmith::event[5676]: S04user-create-unix=action|Event|user-create|Action|S04user-create-unix|Start|1220543226 213733|End|1220543226 411905|Elapsed|0.198172|Status|65280
Sep  4 18:47:06 mail esmith::event[5676]: Running event handler: /etc/e-smith/events/actions/generic_template_expand
Sep  4 18:47:06 mail esmith::event[5676]: expanding /var/service/qpsmtpd/config/goodrcptto 
Sep  4 18:47:06 mail esmith::event[5676]: expanding /var/qmail/users/assign 
Sep  4 18:47:06 mail esmith::event[5676]: WARNING in /etc/e-smith/templates//var/qmail/users/assign/60users: Failed to obtain user details for 'user4' while processing user assignments. 
Sep  4 18:47:06 mail esmith::event[5676]: WARNING in /etc/e-smith/templates//var/qmail/users/assign/70pseudonyms: Failed to obtain user details for 'user4' while processing pseudonym assignments. 
Sep  4 18:47:06 mail esmith::event[5676]: WARNING: Template processing succeeded for //var/qmail/users/assign: 2 fragments generated warnings 
Sep  4 18:47:06 mail esmith::event[5676]:  at /etc/e-smith/events/actions/generic_template_expand line 56 
Sep  4 18:47:06 mail esmith::event[5676]: expanding /var/qmail/alias/.qmail-shared 
Sep  4 18:47:07 mail esmith::event[5676]: expanding /var/qmail/control/badrcptto 
Sep  4 18:47:07 mail esmith::event[5676]: expanding /var/qmail/control/virtualdomains 
Sep  4 18:47:07 mail esmith::event[5676]: expanding /etc/pptpd.conf 
Sep  4 18:47:07 mail esmith::event[5676]: expanding /etc/rssh.conf 
Sep  4 18:47:07 mail esmith::event[5676]: expanding /etc/dhcpd.conf 
Sep  4 18:47:07 mail esmith::event[5676]: expanding /etc/e-smith/pam/accounts.allow 
Sep  4 18:47:07 mail esmith::event[5676]: expanding /etc/e-smith/pam/accounts.deny 
Sep  4 18:47:07 mail esmith::event[5676]: expanding /etc/e-smith/pam/users.allow 
Sep  4 18:47:07 mail esmith::event[5676]: expanding /etc/ppp/options.pptpd 
Sep  4 18:47:07 mail esmith::event[5676]: expanding /etc/ppp/ip-down.local 
Sep  4 18:47:07 mail esmith::event[5676]: expanding /etc/ppp/ip-up.local 
Sep  4 18:47:07 mail esmith::event[5676]: expanding /etc/raddb/users 
Sep  4 18:47:07 mail esmith::event[5676]: expanding /etc/raddb/radiusd.conf 
Sep  4 18:47:07 mail esmith::event[5676]: generic_template_expand=action|Event|user-create|Action|generic_template_expand|Start|1220543226 412192|End|1220543227 859537|Elapsed|1.447345
Sep  4 18:47:07 mail esmith::event[5676]: Running event handler: /etc/e-smith/events/user-create/S20qmail-update-group
Sep  4 18:47:08 mail esmith::event[5676]: S20qmail-update-group=action|Event|user-create|Action|S20qmail-update-group|Start|1220543227 859868|End|1220543228 65108|Elapsed|0.20524
Sep  4 18:47:08 mail esmith::event[5676]: Running event handler: /etc/e-smith/events/user-create/S20qmail-update-user
Sep  4 18:47:08 mail esmith::event[5676]: Can't call method "dir" on an undefined value at /etc/e-smith/events/user-create/S20qmail-update-user line 57. 
Sep  4 18:47:08 mail esmith::event[5676]: S20qmail-update-user=action|Event|user-create|Action|S20qmail-update-user|Start|1220543228 65488|End|1220543228 185591|Elapsed|0.120103|Status|65280
Sep  4 18:47:08 mail esmith::event[5676]: Running event handler: /etc/e-smith/events/user-create/S20user-create-profiledir
Sep  4 18:47:08 mail esmith::event[5676]: Use of uninitialized value in chown at /usr/lib/perl5/site_perl/esmith/util.pm line 102. 
Sep  4 18:47:08 mail esmith::event[5676]: Use of uninitialized value in chown at /usr/lib/perl5/site_perl/esmith/util.pm line 102. 
Sep  4 18:47:08 mail esmith::event[5676]: S20user-create-profiledir=action|Event|user-create|Action|S20user-create-profiledir|Start|1220543228 185865|End|1220543228 362500|Elapsed|0.176635
Sep  4 18:47:08 mail esmith::event[5676]: Running event handler: /etc/e-smith/events/user-create/S25count-active-user-accounts
Sep  4 18:47:08 mail esmith::event[5676]: S25count-active-user-accounts=action|Event|user-create|Action|S25count-active-user-accounts|Start|1220543228 362763|End|1220543228 521949|Elapsed|0.159186
Sep  4 18:47:08 mail esmith::event[5676]: Running event handler: /etc/e-smith/events/user-create/S25ldap-update
Sep  4 18:47:08 mail slapd[4271]: conn=2 fd=7 ACCEPT from IP=127.0.0.1:32924 (IP=0.0.0.0:389)
Sep  4 18:47:08 mail slapd[4271]: conn=2 op=0 BIND dn="cn=root,dc=violet,dc=ro" method=128
Sep  4 18:47:08 mail slapd[4271]: conn=2 op=0 BIND dn="cn=root,dc=violet,dc=ro" mech=SIMPLE ssf=0
Sep  4 18:47:08 mail slapd[4271]: conn=2 op=0 RESULT tag=97 err=0 text=
Sep  4 18:47:08 mail slapd[4271]: conn=2 op=1 ADD dn="uid=user4,dc=violet,dc=ro"
Sep  4 18:47:09 mail slapd[4271]: conn=2 op=1 RESULT tag=105 err=0 text=
Sep  4 18:47:09 mail slapd[4271]: conn=2 op=2 UNBIND
Sep  4 18:47:09 mail slapd[4271]: conn=2 fd=7 closed
Sep  4 18:47:09 mail esmith::event[5676]: S25ldap-update=action|Event|user-create|Action|S25ldap-update|Start|1220543228 522316|End|1220543229 505881|Elapsed|0.983565
Sep  4 18:47:09 mail esmith::event[5676]: Running event handler: /etc/e-smith/events/user-create/S50user-modify-quota
Sep  4 18:47:09 mail esmith::event[5676]: Could not get uid for user named "user4" 
Sep  4 18:47:09 mail esmith::event[5676]: S50user-modify-quota=action|Event|user-create|Action|S50user-modify-quota|Start|1220543229 506228|End|1220543229 631680|Elapsed|0.125452|Status|65280
Sep  4 18:47:09 mail esmith::event[5676]: Running event handler: /etc/e-smith/events/user-create/S55email-assign
Sep  4 18:47:09 mail esmith::event[5676]: qmail-newu: fatal: bad format in users/assign 
Sep  4 18:47:09 mail esmith::event[5676]: S55email-assign=action|Event|user-create|Action|S55email-assign|Start|1220543229 631935|End|1220543229 633655|Elapsed|0.00172|Status|28416
Sep  4 18:47:09 mail esmith::event[5676]: Running event handler: /etc/e-smith/events/user-create/S85user-group-modify
Sep  4 18:47:09 mail esmith::event[5676]: id: user4: No such user 
Sep  4 18:47:09 mail esmith::event[5676]: S85user-group-modify=action|Event|user-create|Action|S85user-group-modify|Start|1220543229 633844|End|1220543229 853012|Elapsed|0.219168
Sep  4 18:47:09 mail esmith::event[5676]: Running event handler: /etc/e-smith/events/actions/adjust-services
Sep  4 18:47:09 mail esmith::event[5676]: adjusting supervised qmail (sighup) 
Sep  4 18:47:09 mail esmith::event[5676]: adjusting supervised qmail (up) 
Sep  4 18:47:09 mail esmith::event[5676]: adjusting supervised smbd (sighup) 
Sep  4 18:47:09 mail esmith::event[5676]: adjusting supervised smbd (up) 
Sep  4 18:47:10 mail esmith::event[5676]: adjusting supervised radiusd (sigterm) 
Sep  4 18:47:10 mail esmith::event[5676]: adjusting supervised radiusd (up) 
Sep  4 18:47:10 mail esmith::event[5676]: adjust-services=action|Event|user-create|Action|adjust-services|Start|1220543229 853320|End|1220543230 25663|Elapsed|0.172343

thank you!
« Last Edit: September 08, 2008, 02:08:22 PM by mmarian »

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: An error occurred creating the user.
« Reply #1 on: September 04, 2008, 06:12:31 PM »
Sep  4 18:47:06 mail esmith::event[5676]: Running event handler: /etc/e-smith/events/user-create/S04user-create-unix
Sep  4 18:47:06 mail esmith::event[5676]: String found where operator expected at /etc/e-smith/events/user-create/S04user-create-unix line 82, near "5   "-m"" 
Sep  4 18:47:06 mail esmith::event[5676]:    (Missing operator before    "-m"?) 
Sep  4 18:47:06 mail esmith::event[5676]: syntax error at /etc/e-smith/events/user-create/S04user-create-unix line 82, near "5   "-m"" 
Sep  4 18:47:06 mail esmith::event[5676]: Execution of /etc/e-smith/events/user-create/S04user-create-unix aborted due to compilation errors. 

There is a bug in your user-create-unix script. It looks to me that you have modified it. What do you see when you run:

rpm -V e-smith-base

at the root command line?

Offline mmarian

  • *
  • 6
  • +0/-0
Re: An error occurred creating the user.
« Reply #2 on: September 05, 2008, 12:22:24 PM »
I see:
[root@mail ~]# rpm -V e-smith-base
S.5....T    /etc/e-smith/events/actions/user-create-unix
S.5....T  c /home/e-smith/db/accounts
S.5....T  c /home/e-smith/db/configuration
S.5....T  c /home/e-smith/db/domains
S.5....T  c /home/e-smith/db/hosts
S.5....T  c /home/e-smith/db/networks

Offline mmarian

  • *
  • 6
  • +0/-0
Re: An error occurred creating the user.
« Reply #3 on: September 05, 2008, 01:15:21 PM »
I have 2 files (1 is backup):
user-create-unix - date of changed is 11.08.2008
and
user-create-unix.backup - date of changed is 31.05.2008

In user-create-unix I see:
# Create the user's unique group first

system(
   "/usr/sbin/groupadd",
   "-g",
   $gid,
   $userName
    ) == 0 or die "Failed to create group $userName.\n";

# Now create the user account

system(
   "/usr/sbin/useradd",
   "-u", $uid,
   "-g", $uid,
   "-c", "$first $last",
   "-d", "/home/e-smith/files/users/$userName",
   "-G", "shared",
5   "-m",  # my comment: line 82
   "-k", "/etc/e-smith/skel/user",
   "-s", "$shell",
   $userName
    ) == 0 or die "Failed to create account $userName.\n";

And in user-create-unix.backup:
# Create the user's unique group first

system(
   "/usr/sbin/groupadd",
   "-g",
   $gid,
   $userName
    ) == 0 or die "Failed to create group $userName.\n";

# Now create the user account

system(
   "/usr/sbin/useradd",
   "-u", $uid,
   "-g", $uid,
   "-c", "$first $last",
   "-d", "/home/e-smith/files/users/$userName",
   "-G", "shared",
   "-m", # my comment: line 82
   "-k", "/etc/e-smith/skel/user",
   "-s", "$shell",
   $userName
    ) == 0 or die "Failed to create account $userName.\n";

In my oppinion is strange, line 82 in user-create-unix contain "5" in col 1.



« Last Edit: September 05, 2008, 01:17:01 PM by mmarian »

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: An error occurred creating the user.
« Reply #4 on: September 05, 2008, 03:50:45 PM »
In my oppinion is strange, line 82 in user-create-unix contain "5" in col 1.

Yes, that's because you, or someone else with administrative access to your system, made that change (on 11.08.2008).

Do:

cd /etc/e-smith/events/actions/
mv -f user-create-unix.backup user-create-unix

and you probably will no longer have a problem.

Offline mmarian

  • *
  • 6
  • +0/-0
Re: An error occurred creating the user.
« Reply #5 on: September 06, 2008, 12:07:34 PM »
Hi CharlieBrady,

Thank's for your help. Now is working.

I have not made changes, I am not very familiar with Linux.
I installed base version (SME Server 7.3), I created users and I installed some contribs packages.
I have not other user whit administrator right.
The contribs is: System Monitoring, Qmail queue management, User Vacation and Service Control

I regularly update server

After several months I need to delete a user and create another and I have this problem.

Thank you once again!

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: An error occurred creating the user.
« Reply #6 on: September 06, 2008, 05:36:18 PM »
I have not made changes, I am not very familiar with Linux.

If nobody else has administrative access to your machine, then you must have accidentally made the change yourself. I suspect you opened the file with an editor - one which makes .backup files when you exit with changes.

Offline mmarian

  • *
  • 6
  • +0/-0
Re: An error occurred creating the user.
« Reply #7 on: September 08, 2008, 01:55:34 PM »
Hi,
I don't remember to made any change on this file. :)
In a short time I need to install a new SME 7.3, if the problem appears I make a new message.

Thank you for your support.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: An error occurred creating the user.
« Reply #8 on: September 08, 2008, 02:08:26 PM »
In a short time I need to install a new SME 7.3, if the problem appears I make a new message.
No, do not create a message, please generate a bug report for it, as a new install should not have this and if it does it should be fixed. the fastest way to it being fixed is by using the bugtracker as the devs do not have the time to scour the forums for issues as well.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline mmarian

  • *
  • 6
  • +0/-0
Re: An error occurred creating the user. - SOLVED
« Reply #9 on: September 08, 2008, 02:31:31 PM »
ok