LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-01-2005, 04:55 PM   #1
nitro
LQ Newbie
 
Registered: Dec 2005
Posts: 1

Rep: Reputation: 0
Enable User account


My team has been running OSX webservers for a while, but we recently had a webserver and its corresponding database inherited to us. Both are running redhat 9.

Anyway, I have an issue, that seems simple, but our support guys don't seen to be helping out much so I thought I would post this here.

We have a mysql database server running on redhat 9 and the account seems to be disabled. When I try to log in remotely via ssh, it says access denied. When I try to login directly on the machine it says the account has been disabled by the adminstrator.

How do you enable the account? I have looked at the (GUI) user manager and the password hasn't expired or been locked. So, nothing to do there.

Is there some way for root to be able to enable the account? Becuase I haven't seen where it can be enabled.
 
Old 12-01-2005, 05:16 PM   #2
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,381

Rep: Reputation: 47
you are trying to connect to mysql? check out UPDATE or GRANT user also check the configs
 
Old 12-01-2005, 05:32 PM   #3
uopjohnson
Member
 
Registered: Jun 2004
Location: San Francisco
Distribution: Slackware, Ubuntu, RHEL, OS X
Posts: 159

Rep: Reputation: 30
I don't' think there is a way to disable accounts. If you log in as root you might want to look at /etc/passwd to see if the account exists. if it exists you can change the password with
Code:
passwd USER
and try to log in again.
 
Old 12-01-2005, 05:32 PM   #4
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
As ive understood it, its the point of the idea to disable logging in as the mysql user. You can get access to it only by issuing as root:
Code:
su mysqluser
Alot more secure that way.. (:
 
Old 12-01-2005, 05:33 PM   #5
Kristijan
Member
 
Registered: Sep 2003
Location: Melbourne, Australia
Distribution: NetBSD 3.0.1, Slackware 10.1
Posts: 394

Rep: Reputation: 30
nitro,

As root you should be able to just;

Code:
su mysql
That should switch you to the user mysql, from there you should be able to do what you wish.

If you have a user already set up in mysql, you can try;

Code:
$ mysql -u username -p
Give it a shot and let me know how you go.

Regards,
Kristijan
 
Old 12-01-2005, 05:44 PM   #6
Kristijan
Member
 
Registered: Sep 2003
Location: Melbourne, Australia
Distribution: NetBSD 3.0.1, Slackware 10.1
Posts: 394

Rep: Reputation: 30
Quote:
Originally posted by uopjohnson
I don't' think there is a way to disable accounts. If you log in as root you might want to look at /etc/passwd to see if the account exists. if it exists you can change the password with
Code:
passwd USER
and try to log in again.
uopjohnson,

You can disable a user account by editing the /etc/shadow file (Assuming you're using shadow password; or you can edit /etc/passwd file instead) and replace the password with an asterisk (*)


Another way to do this is with the usermod command.

Code:
usermod -L username
Will lock the user.

Code:
usermod -U username
Will unlock the user.

I'm pretty sure that's the correct syntax, it's been a while since I've done it

Regards,
-Kristijan
 
Old 12-01-2005, 06:00 PM   #7
uopjohnson
Member
 
Registered: Jun 2004
Location: San Francisco
Distribution: Slackware, Ubuntu, RHEL, OS X
Posts: 159

Rep: Reputation: 30
Nice. I will add that to my list...
I had forgotten about all of the system accounts and such, which are disabled, so I guess I knew that this was possible. I always end up disabling shell access by using /bin/false instead of disabling the user entirely. I also seem to have forgotten about that when I posted... long day I guess.
 
  


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
system account or user account??? yenonn Linux - Newbie 6 05-10-2006 07:49 PM
How to Enable User or Add New User omeryasin Linux - Software 3 10-29-2005 05:16 AM
My user account mfo6463 Linux - Newbie 9 05-13-2004 05:34 PM
Re-enable an expired account xcoach Linux - Newbie 0 04-16-2004 10:39 AM
How to enable Linux Root FTP account ?? chuck77 Linux - General 2 04-25-2003 12:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:32 AM.

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