掲示板

Who is the "default user"?

thumbnail
16年前 に Joel Kozikowski によって更新されました。

Who is the "default user"?

Expert 投稿: 405 参加年月日: 06/06/28 最新の投稿
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?
thumbnail
16年前 に Ed Shin によって更新されました。

RE: Who is the "default user"?

Junior Member 投稿: 71 参加年月日: 05/03/24 最新の投稿
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);
thumbnail
16年前 に Joel Kozikowski によって更新されました。

RE: Who is the "default user"?

Expert 投稿: 405 参加年月日: 06/06/28 最新の投稿
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.
13年前 に Kumar B によって更新されました。

RE: Who is the "default user"?

New Member 投稿: 3 参加年月日: 10/11/24 最新の投稿
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???
thumbnail
13年前 に Mika Koivisto によって更新されました。

RE: Who is the "default user"?

Liferay Legend 投稿: 1519 参加年月日: 06/08/07 最新の投稿
Just add following properties to you portal-ext.properties to configure the default admin user:
##
## Company
##

    #
    # This sets the default web id. Omniadmin users must belong to the company
    # with this web id.
    #
    company.default.web.id=liferay.com

##
## Default Admin
##

    #
    # Set the default admin password.
    #
    default.admin.password=test

    #
    # Set the default admin screen name prefix.
    #
    default.admin.screen.name=test

    #
    # Set the default admin email address prefix.
    #
    default.admin.email.address.prefix=test

    #
    # Set the default admin first name.
    #
    default.admin.first.name=Test

    #
    # Set the default admin middle name.
    #
    default.admin.middle.name=

    #
    # Set the default admin last name.
    #
    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.
11年前 に James Cuzella によって更新されました。

RE: Who is the "default user"?

New Member 投稿: 1 参加年月日: 12/03/27 最新の投稿
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:

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