LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-03-2002, 09:38 AM   #16
themuppeteer
LQ Newbie
 
Registered: Nov 2001
Location: Belgium
Posts: 18

Rep: Reputation: 0

when you get a bash prompt, type 'whoami' ... who knows, you might be root...
 
Old 12-03-2002, 09:38 AM   #17
themuppeteer
LQ Newbie
 
Registered: Nov 2001
Location: Belgium
Posts: 18

Rep: Reputation: 0
and DON'T type login, as you are already logged in .
 
Old 12-03-2002, 09:51 AM   #18
cruella
LQ Newbie
 
Registered: Jun 2001
Posts: 17

Original Poster
Rep: Reputation: 0
I am gina....not root.
 
Old 12-03-2002, 09:59 AM   #19
cruella
LQ Newbie
 
Registered: Jun 2001
Posts: 17

Original Poster
Rep: Reputation: 0
I type "whoami" and it says "cannot find username for UID 0"... I guess I am root, but I cannot change directory to /etc to edit the passwd file... What can I do from the bash prompt?
 
Old 12-03-2002, 10:06 AM   #20
themuppeteer
LQ Newbie
 
Registered: Nov 2001
Location: Belgium
Posts: 18

Rep: Reputation: 0
On my machine, it was not bash but sh# that was started. I could edit /etc/passwd. Don't you have permission ? probably not hu?

cant you do cd /etc ?

if so, goto sh like I did (type sh)
and then try.
(and everytime tell me what he says to)
 
Old 12-03-2002, 10:07 AM   #21
themuppeteer
LQ Newbie
 
Registered: Nov 2001
Location: Belgium
Posts: 18

Rep: Reputation: 0
I'm going home now. I'll cu tomorrow.
 
Old 12-03-2002, 06:13 PM   #22
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
download this: www.toms.net/rb and from there edit your passwd file.
 
Old 12-03-2002, 06:15 PM   #23
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 63
Surely if booting toyour Linux bootloader into the bootsector of your main Linux partition, and use something rl1 (linux single) logs you in as uid 0 you will still be able to edit the file, even if the user that is associated with uid 0 doesn't exist? In which case, you might be able to fix this without having to download anyting!
 
Old 12-03-2002, 11:39 PM   #24
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 49
You should be able to just boot from your install disk, stop the
install w/o rebooting, mount the relevant partition (the one that
contains the /etc/ directory, either edit /mountpoint/etc/passwd
and add the user root, or copy the passwd.bak over passwd (do
you know root's passwd?). If your installation doesn't allow you
to stop the install w/o rebooting, simply hit: ALT-F2. This should
give you another console, from which you can log in as root
(the install has a user root), usually without a password. Then
go on to mount the partition.
 
Old 12-04-2002, 01:21 AM   #25
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
Downloading and having tom's root boot has saved me dozens of times... I think that even if you don't use it for this particular case you should have it.

BTW... how did you manage to delete the root user... I mean.. that is something that only the root can do. Does anyone else have access to the root on that server? you should talk to that dude anyway.
 
Old 12-04-2002, 12:07 PM   #26
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
lol, Just re-install the entire system!, you'll save youself from doing all these things....

what the heck happened anyway??, it's not likely that any distro installation let you install without making a root account...

did you get hacked or something??
 
Old 12-04-2002, 09:49 PM   #27
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
Come on!!! reinstalling the entire system is a Micro$oft solution. Linux System Administrators know how to solve these kind of problems. I insist, all you need it to boot from a rescue disk and add the root account With UID and GID 0 and you'll be able to do anything. Or even boot in single-user, but if the root was properly deleted you shouldn't be ablo to log in.
 
Old 12-04-2002, 10:01 PM   #28
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
get Toms root boot and fix it by mounting the filesystem and adding root user. Because when you boot Toms root boot you will be root
 
Old 12-04-2002, 10:34 PM   #29
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
Quote:
Originally posted by DavidPhillips
get Toms root boot and fix it by mounting the filesystem and adding root user. Because when you boot Toms root boot you will be root
You'll have to mount your root partition and chroot there before adding the user (so it will be added to your root partition /etc/passwd)
 
Old 12-06-2002, 07:21 AM   #30
cruella
LQ Newbie
 
Registered: Jun 2001
Posts: 17

Original Poster
Rep: Reputation: 0
Okay, I don't mean to sound useless, but I created the boot disk from toms.net and I booted up the Linux Server. Can someone tell me how to change to my local drive so that I can change the etc/passwd file? I've been looking in books, but nothing helpful..

Thanks for any help you've given me or can give me.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Does this exist? oneandoneis2 Linux - General 3 01-26-2005 05:46 PM
/bin/sh doesn't exist??? silv3rhat Linux - Newbie 2 12-31-2003 04:03 PM
Does this exist? WorldBuilder General 3 08-20-2003 09:28 PM
/etc/limits doesn't exist hampel Slackware 2 07-15-2003 11:26 AM
/etc/rc.d/rcX.d does not exist !!!!!!!!!!!!! safrout Linux From Scratch 6 11-10-2002 06:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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