473,657 Members | 2,572 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Modifying users password in pg_shadow from php

Hi All,
I'm wonder if there is any possibility to modify a users password by
updating the pg_shadow table.
I'd like to ensure that when the user modifies his/her http password
(htpasswd) than his database password also changes. It is important to have
the same password for both services. I plan to do it from php.

Is there any way to do so?

Thans,
-- Csaba Együd

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date: 2004.09.17.

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #1
2 2137
On Sat, Sep 25, 2004 at 05:40:27PM +0200, Egy?d Csaba wrote:
I'm wonder if there is any possibility to modify a users password by
updating the pg_shadow table.


Why not use ALTER USER?

http://www.postgresql.org/docs/7.4/s...alteruser.html

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #2
ohhhhhh thanks. what a stupid i am. ....:)))

-----Original Message-----
From: pg************* ****@postgresql .org
[mailto:pg****** ***********@pos tgresql.org] On Behalf Of Michael Fuhr
Sent: Saturday, September 25, 2004 5:56 PM
To: Egy?d Csaba
Cc: Pg***********@P ostgresql.Org
Subject: Re: [GENERAL] Modifying users password in pg_shadow from php

On Sat, Sep 25, 2004 at 05:40:27PM +0200, Egy?d Csaba wrote:
I'm wonder if there is any possibility to modify a users password by
updating the pg_shadow table.


Why not use ALTER USER?

http://www.postgresql.org/docs/7.4/s...alteruser.html

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date: 2004.09.17.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date: 2004.09.17.

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
7472
by: Gerald | last post by:
I'm new to DB2, I have over 10 years of experience on Oracle. I actually have to books on order that might help. Till then I have been searching and reading through IBM's DB2 Information Center, as well as manuals on IBM's website. I'm working with DB2 because the client uses it, so enough on that subject. I'm trying to figure out how to change the password for a user created in the control center. I don't like operating system
1
1815
by: William Harazim | last post by:
Is there a way, having a user entered username and password, to select a single row from pg_shadow which is using md5 password encryption? I'm currently authenticating web users (.asp page) with our own user table that uses crypt() to store passwords. I'd like to remove our 'redundant' user table and use pg_shadow. The authentication function I'm using is included in the attachment... Thanks. <<auth_user.txt>> William Harazim,...
26
5492
by: David Garamond | last post by:
I read that the password hash in pg_shadow is salted with username. Is this still the case? If so, since probably 99% of all PostgreSQL has "postgres" as the superuser name, wouldn't it be better to use standard Unix/Apache MD5 hash instead? -- dave ---------------------------(end of broadcast)---------------------------
1
6194
by: Neil Berkman | last post by:
Is there any way to remove a password, specifically from the postgres user? I installed the 8.0 Windows version via the installer, and it forces you to set a password. I'd like to reset this so that there is no password (basically, to match the setup on several other machines - and no, for a number of reasons it's not feasible to just set passwords on those other machines). I know about the alter user command, but I haven't seen a way...
6
5139
by: Jan | last post by:
Hi: I have created a secured database for a client. For various reasons, I don't want the client to have full persmissions for the database; they aren't in the admins group. I have instead tried to create a second group, called "localAdmin," for the admin-type person at the client. I want this group to be able to do some basic admin-type stuff, including adding new users and clearing passwords if users forget theirs. I can't seem to...
1
2433
by: Arpan | last post by:
Suppose a web.config file (existing in C:\Inetpub\wwwroot\ASPX) has the following code: <configuration> <system.web> <authentication mode="Forms"> <forms name="AuthenticateUser" loginUrl="ValidateUser.aspx"> <credentials passwordFormat="Clear"> <user name="simon" password="nomis"/>
0
1235
by: Straw | last post by:
I found this script for modifying sp_password. My requirements are that the password must be at least 8 characters long and have a minimum of 1 numeric character in the 2nd through next-to-last position. I've got the 8 char long below. Can someone tell me how to do the minimum of 1 numeric character in the 2nd through next-to-last position? thanks! declare @position smallint, -- @numCaps...
4
3639
by: R.A.M. | last post by:
Hello, I am learning ASP.NET. In web application I am programming now I decided to add a table "Users" to aspnetdb database (with extra data about users) and a trigger AFTER UPDATE of "aspnet_Users" table. But now I cannot run my application because of error in line: MembershipUser mu = Membership.GetUser(); System.Data.SqlClient.SqlException: Cannot open user default database. Login failed. Login failed for user 'PC\ASPNET'. A few...
3
8713
by: Paul | last post by:
Hello All, I am working through the SAMS "ASP.NET 2.0 - Unleased" book to teach myself ASP.NET. It is a great book, but Chapter 21 "Using ASP.NET Membership" is causing me problems - or maybe I am just missing something. It is telling me that in order to modify user password requirements I need to add the following to the web.config file.
0
8326
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8845
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8743
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8522
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8622
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6177
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2745
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1973
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.