LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-29-2005, 03:15 AM   #1
omeryasin
LQ Newbie
 
Registered: Jul 2005
Distribution: Red Hat Linu 9.0
Posts: 12

Rep: Reputation: 0
How to Enable User or Add New User


Hello i have RH9 with a user "omeryasin" i tried to delete the folder in sub directory of following path

/usr/src/redhat/build

but i have no root access so i cant delete that folers so i change my account

group from "omeryasin" to "admin" after this when i reboot my computer

I could not login to my account also i do not have any other user installed

whenever i try to login it asks that administrator has disable your account

what i should do now as i have no other user installed.Please tell me step

by step as i dont know much about linux.
 
Old 10-29-2005, 04:20 AM   #2
mr_demilord
Member
 
Registered: Sep 2005
Posts: 244

Rep: Reputation: 30
Re: How to Enable User or Add New User

Quote:
Originally posted by omeryasin
Hello i have RH9 with a user "omeryasin" i tried to delete the folder in sub directory of following path

/usr/src/redhat/build

but i have no root access so i cant delete that folers so i change my account

group from "omeryasin" to "admin" after this when i reboot my computer

I could not login to my account also i do not have any other user installed

whenever i try to login it asks that administrator has disable your account

what i should do now as i have no other user installed.Please tell me step

by step as i dont know much about linux.
If you are a user you only have full permission in you $HOME directory.
to remove the directory
type in the konsole
<sudo rm -r /usr/src/redhat/build>
<root password>
to enable the user again type
<su>
<root password>
<useradd omeryasin>
<new password of omeryasin 2X>

If you want to add a new user do
<su>
<root password>
<useradd new_user>
<new password 2X for new_user>

if you want to delete a user type
<su>
<root passowrd>
<userdel new_user>


For more info see

man useradd
man su
man userdel
man sudo

Last edited by mr_demilord; 10-29-2005 at 04:24 AM.
 
Old 10-29-2005, 04:50 AM   #3
omeryasin
LQ Newbie
 
Registered: Jul 2005
Distribution: Red Hat Linu 9.0
Posts: 12

Original Poster
Rep: Reputation: 0
Where would i put these commands as i could not login so there is no terminal how to get terminal in front to me
so that i could write these commands

Last edited by omeryasin; 10-29-2005 at 04:51 AM.
 
Old 10-29-2005, 05:16 AM   #4
mr_demilord
Member
 
Registered: Sep 2005
Posts: 244

Rep: Reputation: 30
Boot from the red hat 1st CD choose recue
then do
<export redhat=/mnt/redhat>
<mkidr $redhat>
<mount /dev/hda1 $redhat>

Edit the /mnt/redhat/etc/passwd file for the user which will now be located as:

<pico /mnt/redhat/etc/passwd>

You might also need to remove (blank) the password entry for that user in /etc/shadow. You should b able to boot the original Linux and login.
with the command

<pico /mnt/redhat/etc/shadow>

the entry in the line should be something like this
root:x:0:0:root:/root:/bin/bash
username:x:1000:100:Your Name:/home/username:/bin/bash
[b]!and alot of system accounts leave that alone![b]
There will be an entry in the /mnt/redhat/etc/shadow like:
<yourusername:$blshfhes:$djfjejfv>
edit it that it looks like <yourusername:>
same for root.

Last edited by mr_demilord; 10-29-2005 at 05:25 AM.
 
  


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
How to list user in Linux box, add an user to a group! steady_lfcfan Linux - Newbie 12 01-27-2013 01:14 PM
user home dir doesn't create when new user add dev_mohamed Linux - Software 3 01-12-2007 01:08 AM
Enable User account nitro Linux - Newbie 6 12-01-2005 06:00 PM
Help! Cannot Add a User to User Manager or Change Root Password lennysokol Linux - General 2 06-25-2005 09:59 AM
Enable PHP in ~user Directories user1234 Linux - Software 1 03-11-2004 03:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:44 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