[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Login problems



Ashley,

Tried first command and got:

postgres=# GRANT ALL ON SESSION TO ledger-smb;
ERROR:  syntax error at or near "-" at character 31
LINE 1: GRANT ALL ON SESSION TO ledger-smb;
                                     ^
Next did the "psql -h localhost -U ledger-smb lsmb-db-name" as:

psql -h localhost -U ledger-smb ledger-smb

(ledger-smb is I guess the username and database name)

and I got the "ledger-smb=#" prompt.

I don't know how to check the conf file as you indicated. As you can
probably tell, I am very green. Green but trying! lol

Anyhow, I tried the previous "grant all" command again under this
account and got the same thing:

ledger-smb=# grant all on session to ledger-smb;
ERROR:  syntax error at or near "-" at character 31
LINE 1: grant all on session to ledger-smb;
                                     ^

Erg...any more things you can think of that I missed, perhaps?

Thanks!

- Matt



On 3/5/07, Ashley J Gittins <..hidden..> wrote:
On Mon, 5 Mar 2007, Matt Jackson wrote:
> psql
> (which gives me "postgres=#" prompt)
>
> grant all on session to ledger-smb
>
> (which was, I believe, the username I set up, according to this
> tutorial: http://www.ubuntuforums.org/showthread.php?p=2236136 )
> but then no confirmation message like those CREATE MAKE DATABASE or
> whatever messages came up.

Two things, in psql you need to end each statement with a semicolon, the
database won't execute your query until you enter the ";" and press return.
Secondly, you should be able to check your postgres username by looking in
the LedgerSMB config file (don't know the name sorry). At any rate, you will
probably get an error from the grant command if you have the username
incorrect.

You might want to consider granting permissions on all the tables (I don't
know if there are good security reasons to not do this) with something like:

grant all on * to ledger-smb;


> I tried to login again at the login.pl page with ledger-smb and
> password, but got access denied and then tried to login at the
> admin.pl page with password admin as set up in above link, as well as
> a blank password field and got access denied on first, session expired
> on second.

Since you're getting session errors I am guessing that you are getting logged
into the database ok, but just in case you can verify the db login details
using

psql -h localhost -U ledger-smb lsmb-db-name

As a normal user. It should prompt you for the password for the ledger-smb
account before letting you in. Using that you can check that the user/pass in
your lsbm config file are correct. Note that using -h tells psql to use a tcp
connection to the database rather than a unix socket, which would likely have
different auth settings.

Does that muddy the waters enough? ;-)

--
Regards,
        Ashley J Gittins
        web:    http://www.purple.dropbear.id.au
        jabber: ..hidden..

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users



--
Regards,
Matt