LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 05: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, 06:16 PM   #2
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Honolulu, HI
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
you are trying to connect to mysql? check out UPDATE or GRANT user also check the configs
 
Old 12-01-2005, 06: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, 06: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, 06: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, 06: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, 07: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 08:31 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration