Combination View Flat View Tree View
Threads [ Previous | Next ]
Joel Kozikowski
Who is the "default user"?
February 27, 2008 7:04 AM
Answer

Joel Kozikowski

Rank: Expert

Posts: 405

Join Date: June 27, 2006

Recent Posts

I'm about to move my new LR 4.4 portal into beta testing for my company. I'm doing a "test run" of the upgrade from LR 4.3 (which in turn was upgraded from 4.1).

During the startup and conversion process, I see a "NoSuchUserException", which is traced to the fact that my database has no "default user." There is a "defaultUser" column (not sure when that showed up), and its set to zero for every user in my database.

It will be a quick patch to the db for me, but WHO should be the "default user?" Should it be the omni-admin? The guest? Some other user?
Edward Shin
RE: Who is the "default user"?
February 27, 2008 7:44 AM
Answer

Edward Shin

LIFERAY STAFF

Rank: Junior Member

Posts: 71

Join Date: March 23, 2005

Recent Posts

Yup, the guest should be the default user. In portal-data-sample.vm I have:

insert into User_ (userId, companyId, createDate, modifiedDate, defaultUser, contactId, password_, passwordEncrypted, passwordReset, screenName, emailAddress, greeting, loginDate, failedLoginAttempts, agreedToTermsOfUse, active_) values ($defaultUserId, $companyId, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, TRUE, $defaultContactId, 'password', FALSE, FALSE, '$defaultUserId', 'default@liferay.com', 'Welcome!', CURRENT_TIMESTAMP, 0, TRUE, TRUE);
Joel Kozikowski
RE: Who is the "default user"?
February 27, 2008 8:59 AM
Answer

Joel Kozikowski

Rank: Expert

Posts: 405

Join Date: June 27, 2006

Recent Posts

Oops! Looks like I DO already have a "default user". Upon further inspection, the upgrade script was trying to verify resources for an article, and the company Id about three of my JournalArticle records was for a company Id that does not exist.

Hard to tell where those records came from, but my guess is that they were "lost in translation" somewhere along the way.
Kumar B
RE: Who is the "default user"?
November 24, 2010 3:23 AM
Answer

Kumar B

Rank: New Member

Posts: 3

Join Date: November 24, 2010

Recent Posts

We are working on an enterprise software and wants Liferay as part of that platform. Obviously, we want the default admin login as part of the configuration. So, where exactly is test@liferay.com is coming from and is there a way to configure that, at all???
Mika Koivisto
RE: Who is the "default user"?
November 24, 2010 10:31 AM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1499

Join Date: August 7, 2006

Recent Posts

Just add following properties to you portal-ext.properties to configure the default admin user:
 1##
 2## Company
 3##
 4
 5    #
 6    # This sets the default web id. Omniadmin users must belong to the company
 7    # with this web id.
 8    #
 9    company.default.web.id=liferay.com
10
11##
12## Default Admin
13##
14
15    #
16    # Set the default admin password.
17    #
18    default.admin.password=test
19
20    #
21    # Set the default admin screen name prefix.
22    #
23    default.admin.screen.name=test
24
25    #
26    # Set the default admin email address prefix.
27    #
28    default.admin.email.address.prefix=test
29
30    #
31    # Set the default admin first name.
32    #
33    default.admin.first.name=Test
34
35    #
36    # Set the default admin middle name.
37    #
38    default.admin.middle.name=
39
40    #
41    # Set the default admin last name.
42    #
43    default.admin.last.name=Test


The company.default.web.id defines the domain part of the default admin email address. Now the default user that you see in your database is the Guest or anonymous user of that instance.
James Cuzella
RE: Who is the "default user"?
October 4, 2012 12:44 PM
Answer

James Cuzella

Rank: New Member

Posts: 1

Join Date: March 27, 2012

Recent Posts

Thank you for pointing out the default.admin.email.address.prefix property! I was having the same problem where default.admin.email.address was not working the same as in version 6.1.10ga1. It seems behavior changed since then. (Now using: 6.1.20ga2 ). Setting the prefix to the same as default.admin.screen.name fixed it for me!

My other workaround was to set the email address manually using this SQL statement:

mysql --user="$liferay_dbuser" --password="$liferay_dbpass" --database="$liferay_database" --execute="UPDATE User_ SET emailAddress = '${user_email}' WHERE emailAddress LIKE 'test@%';"