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

Re: Login problems



On Tue, 6 Mar 2007, Matt Jackson wrote:
> 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;
>                                       ^

Ahh, you'll need to quote the username, as the hyphen is an operator, I guess. 
I think double quotes (") around just the username should do it. Ie:

grant all on * to "ledger-smb";

If that gives you and error then it's single quotes - I always get mixed up 
between them with psql :-)

> Next did the "psql -h localhost -U ledger-smb lsmb-db-name" as:
> psql -h localhost -U ledger-smb ledger-smb
> and I got the "ledger-smb=#" prompt.

Cool, that means the username and password you used are correct.

> 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

On an sql-ledger install, it's where you unpacked SL, 
named "sql-ledger.conf" - I dunno if it'll be sql-ledger.conf or 
ledger-smb.conf or what - but go to where you installed LSMB and do an ls - 
that will show you the files, I expect there'll only be one .conf file, so 
note the name and open it up in your favourite editor, take a look at the 
database connection info. I doubt that's your problem though - get the grant 
command working first.

> 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;
>                                       ^

Yep. Same quoting thing as above - but that account won't have permission to 
grant rights on that db anyway, most likely - you want to do it from the 
postgres account.

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