LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 07-04-2004, 10:56 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
How to allow userA to su another user


Hi folks,

As root I have created 'postgresadmin' as a new user

# adduser postgresadmin

Thereafter root can 'su' postgresadmin without password.

Now I am prepared to allow 'userA' to 'su' postgresadmin

$ su postgresadmin
Password

Kindly advise how to add a password for userA to 'su' postgresadmin. OR which file shall I edit to add a password for userA to 'su' postgresadmin.

TIA

B.R.
satimis
 
Old 07-04-2004, 11:55 AM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"Kindly advise how to add a password for userA to 'su' postgresadmin. OR which file shall I edit to add a password for userA to 'su' postgresadmin."

Either root or postgresadmin can create the password for postgresadmin by using the passwd command. See:
man passwd

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 07-04-2004, 10:25 PM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi jailbait,

Tks for your advice.

I went through man passwd and could not find my answer there. What I want to do is as follows;

Now 'userA' can't su (switch user) 'postgresadmin'. He must su 'root' first with root password and then su 'postgresadmin. But I do want giving userA root password. I expect to create a password for him to su 'postgresadmin

[userA@localhost userA]$ su - postgresadmin
Password:
su: incorrect password

There is no password created yet. I tried 'root password' and 'userA's own password' and all did not work

I am trying to find a correct command line creating a password for userA to su 'postgresadmin' directly/himself.

TIA

B.R.
satimis
 
Old 07-05-2004, 09:40 AM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"I am trying to find a correct command line creating a password for userA to su 'postgresadmin' directly/himself."

userA cannot create a password for postgresadmin. Either root or postgresadmin can create a password for postgresadmin using passwd. Then userA can su to postgresadmin using that password.

-------------------------
Steve Stites
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba -- XP user can log in to shares but smbclient user always gets password errors ejoe Linux - Software 3 04-18-2005 10:55 AM
SUDO - allow user joe to SU to usera sajjad02 Linux - Newbie 1 03-10-2005 01:25 PM
grant user access to /fat-c & copying users' preferences to another user n0x Linux - Newbie 1 07-04-2004 12:04 AM
Games runs slow as normal user, but fast as root user mcore Linux - Software 2 06-07-2004 11:11 PM
Pleasehelp with proftpd.conf - trying to config user to write files as other user. philg Linux - Software 1 06-21-2003 12:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 11:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration