Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #94410

Re: password authentication failed

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!bcyclone05.am1.xlned.com!bcyclone05.am1.xlned.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <gary719_list1@verizon.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'yet.': 0.03; 'root': 0.04; 'schema': 0.05; 'subject:password': 0.05; 'data:': 0.07; 'permissions': 0.07; 'postgresql': 0.07; 'excluding': 0.09; 'migration': 0.09; 'normally,': 0.09; 'postgres': 0.09; 'subject:skip:a 10': 0.09; 'python': 0.10; 'accordingly.': 0.13; 'django': 0.13; 'appropriate': 0.14; "skip:' 30": 0.15; 'things.': 0.15; 'above?': 0.16; 'bit.': 0.16; 'cause.': 0.16; 'commas,': 0.16; "db's": 0.16; 'distinct': 0.16; 'helps!': 0.16; 'manage.py': 0.16; 'received:206.46': 0.16; 'received:206.46.173': 0.16; 'settings.py': 0.16; 'subject:failed': 0.16; 'sudo': 0.16; 'this)': 0.16; 'wrote:': 0.16; 'skip:g 40': 0.18; 'archive': 0.18; '>>>': 0.20; '2015': 0.20; 'permission': 0.20; 'fix': 0.21; 'work,': 0.21; 'assumes': 0.22; 'denied': 0.22; 'either.': 0.22; 'globally.': 0.22; 'file.': 0.22; 'am,': 0.23; 'select': 0.23; 'skip:( 40': 0.23; 'tables': 0.23; 'this:': 0.23; 'tried': 0.24; 'header:User-Agent:1': 0.26; "doesn't": 0.26; 'command': 0.26; 'chris': 0.26; 'connected': 0.27; 'error': 0.27; 'fri,': 0.27; 'host': 0.28; 'regular': 0.29; 'archives': 0.29; 'separated': 0.29; "i'm": 0.30; 'error.': 0.31; 'probably': 0.31; 'option': 0.31; 'role': 0.32; 'possibly': 0.32; 'maybe': 0.33; 'getting': 0.33; 'run': 0.33; 'point': 0.33; 'changed': 0.33; 'options': 0.33; 'point,': 0.33; 'username': 0.33; 'file': 0.34; 'server': 0.34; 'lists': 0.34; 'list': 0.34; 'so,': 0.35; 'behind': 0.35; 'replace': 0.35; 'too': 0.36; 'skip:i 20': 0.36; 'should': 0.36; 'project': 0.36; 'created': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'two': 0.37; 'thanks': 0.37; 'environment.': 0.37; 'things': 0.38; 'virtual': 0.38; 'skip:p 20': 0.38; 'data': 0.39; 'sure': 0.39; 'does': 0.39; 'application': 0.39; 'takes': 0.39; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'some': 0.40; 'header :MIME-version:1': 0.60; 'your': 0.60; 'hope': 0.61; 'advanced': 0.61; 'charset:windows-1252': 0.62; 'different': 0.63; 'received:206': 0.63; 'user,': 0.67; 'jul': 0.72; 'clicking': 0.75; '127.0.0.1': 0.84; 'chrisa': 0.84; 'database:': 0.84; 'header:In-reply-to:1': 0.84; 'different.': 0.91; 'received:192.168.1.7': 0.91; 'reside': 0.91; 'resides': 0.91
X-CMAE-Score 0
X-CMAE-Analysis v=2.1 cv=WcjxEBVX c=1 sm=1 tr=0 a=AstGAA2XJoPAehtj9MTdvA==:117 a=o1OHuDzbAAAA:8 a=oR5dmqMzAAAA:8 a=zKzDOiuOpD0A:10 a=-9mUelKeXuEA:10 a=N659UExz7-8A:10 a=zOBTXjUuO1YA:10 a=RnM-VmtOZWuMCnduVvcA:9 a=pILNOxqGKmIA:10
Date Wed, 22 Jul 2015 16:35:58 -0700
From Gary Roach <gary719_list1@verizon.net>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0
MIME-version 1.0
To python-list@python.org
Subject Re: password authentication failed
References <55A694AB.2020408@verizon.net> <CAPTjJmq8fRP3DohC5hZMLSXUZ=oCvA7VSA1WBtJWRoG=sq6fKA@mail.gmail.com> <55A83F93.4030403@verizon.net> <CAPTjJmrq8r-EDJA0wDZN0sw=6Qnri7nD4fyyc0VncM+jvAJQXg@mail.gmail.com>
In-reply-to <CAPTjJmrq8r-EDJA0wDZN0sw=6Qnri7nD4fyyc0VncM+jvAJQXg@mail.gmail.com>
Content-type text/plain; charset=windows-1252; format=flowed
Content-transfer-encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.892.1437608162.3674.python-list@python.org> (permalink)
Lines 81
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1437608162 news.xs4all.nl 2824 [2001:888:2000:d::a6]:60254
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 7758
X-Received-Body-CRC 934091399
Xref csiph.com comp.lang.python:94410

Show key headers only | View raw


On 07/16/2015 04:53 PM, Chris Angelico wrote:
> On Fri, Jul 17, 2015 at 9:34 AM, Gary Roach <gary719_list1@verizon.net> wrote:
>> On 07/15/2015 11:25 AM, Chris Angelico wrote:
>>
>>> You should then be able to create a regular user, and grant
>>> appropriate permissions:
>>>
>>> postgres=# create user archives password
>>> 'traded-links-linguistics-informal';
>>> CREATE ROLE
>>> postgres=# grant all on database archivedb to archives;
>>> GRANT
>> I really appreciate the help Chris. I created a user archive with password
>> 'xxxxxx' and changed the settings.py file accordingly. When I tried  python
>> manage.py migrate I got the following error with it's traceback:
>>
>> (archivedb)root@supercrunch:~/archivedb# python manage.py migrate
>> [chomp]
>> django.db.utils.ProgrammingError: permission denied for relation
>> django_migrations
> This suggests that your new user doesn't have permissions set yet. Did
> you do the grant command as listed above? If so, you may have to also
> do this:
>
> $ sudo sudo -u postgres psql archivedb
> postgres=# grant all on all tables in schema X to archives;
I did the above.
> Replace X with the name of the database schema you use - possibly
> "public" or some other user name. You can list multiple schema names,
> separated by commas, if you need to.
>
> To list all schemas in the database:
>
> select distinct table_schema from information_schema.tables;
I did all of the above. Since I only plan on one datebase - excluding 
the system db's - I'm dumping everything into the public schema.
> Hope that helps!
>
> ChrisA
I'm still getting the same migration error.

At this point, I'm confused about a few things. Does the postgresql 
server and my archivedb reside globally or are they inside my archivedb 
virtual environment. I think globally.

To get pgAdmin3 to work, I  have to have it set so that it logs in as 
gary ( no choice with this) and set group to root. Then in application > 
advanced options set run as different user to root. This assumes that 
you are using a KDE4 desktop and have these option by right clicking the 
icons.

pgAdmin3 data:
     Server Group > Server(1) > archivedb
                                                     |_ Host name - 
127.0.0.1
                                                     |_ username - archive
                                                     |_ connected - no
Archivedb requires a password to go deeper and takes the xxxxxx password 
that is in the django settings.py file. This opens up access to 
archivedb and lists archivedb > Schema(1) > public > tables(10). At this 
point I found that all  of the sequences and all of the tables are owned 
by root. This is probably the root (no pun intended) cause. Now what do 
I do about it. I'm not sure how this came about so don't know how to fix it.

In the OS I have a postgres user in the passwd file and in the group 
file have the following:
     gary:x:1000:root,backuppc,sudo,postgres,users
     root:x:0:backuppc,gary,staff,postgres,users
     postgres:x:117:root,gary

Normally, I don't have to worry too much about security because my two 
user network resides behind a verizon router firewall. I don't have much 
in the way of sensitive data either. This project may be different. So 
maybe I need to tighten things up a bit.

Thanks for your help

Gary R


Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: password authentication failed Gary Roach <gary719_list1@verizon.net> - 2015-07-22 16:35 -0700

csiph-web