Root password canged while im loged in

  • ALV
  • Novice
  • Novice
  • User avatar
  • Posts: 30
  • Loc: swe

Post 3+ Months Ago

Hi i use freebsd.

my box have ben ronning like 1 and half yare nonstop without pproblems.. but then i tryed to su from a ssh client to edit some scripts and so an and my root password stoped woking.. and i was still loiged in woith root on the box it self så i tryed to change the passwod by typing :

passwd
New passwrd: lol
Retype new password: lol

and here i get this funny statment that i dont haave promision to change /etc/maste.passwd accses denied.

and the i started reading on mailing lists and no sulotion was found i stl tyed with som chages of the owne of the files and chmod to 777 but to no help..

i desided to reboot and login with soingel use mood. mounted the filesystem= mount -t tuf -a

not sure if i wrote tuf but somthing like that and i got in with shell sh. finaly typed passwd one more and tryed to change it. but i didnt have promission. so now im about to revomat and make a clean install.. but that isnt what had hoped for.. it takes som time to recompile the kernal and installing all httpd an ftpd programs along with databases with i have to rebuild... so if any of you even understand what im writing and what i can do about it.. pleas give me some sugestions..


and maby i shuld add the non of my users is longer able to login.

i also got a tip of that i have got hacked thru php becuse i have set som promissions to high. but that is hard to beleve for me cus if any one was THAT intrested in my box he must have ben misstaking. i have like 5 hompages an d like 4 databases with no special intrest..



thanks in advance... and no i am not in the mood or have time of spell checking even thou ita a great future in thios forum...
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • MISC/A++
  • Expert
  • Expert
  • User avatar
  • Posts: 508
  • Loc: UnderGround

Post 3+ Months Ago

Quote:
and no i am not in the mood or have time of spell checking even thou ita a great future in thios forum..


well, you do have a lot of spelling mistakes, basically you are making our life harder.

What about Single-User Mode, have you tried that?
  • ALV
  • Novice
  • Novice
  • User avatar
  • Posts: 30
  • Loc: swe

Post 3+ Months Ago

yes now i have about tryed everything.. i asked in freebsd on irc and i have got 3 ohers of help but no sulotion..
the current state is that i can login via ssh on a user but i cant su and i cant login by console on user nor root
  • MISC/A++
  • Expert
  • Expert
  • User avatar
  • Posts: 508
  • Loc: UnderGround

Post 3+ Months Ago

What I meant is that, have you tried creating a new root account?
  • ALV
  • Novice
  • Novice
  • User avatar
  • Posts: 30
  • Loc: swe

Post 3+ Months Ago

no i havnt..
hwo do i do that?
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

Users cannot su to root unless they are in the wheel group, but of course in order to add people to the wheel group, you have to be root.

If you have forgotten the root password, your only option is to log into single-user mode.
At the condole, reboot the machine. During the countdown timer to boot normally, hit the space bar. At the boot prompt, type
boot -s
You will be in single user mode, no password required. Change the password to something you know, and make sure your user is added to the wheel group.

If while in single-user mode you run across a permissions issue, something is VERY wrong with the system. You were not running ACL's, were you?
  • ALV
  • Novice
  • Novice
  • User avatar
  • Posts: 30
  • Loc: swe

Post 3+ Months Ago

no ... an i have done tha singel user mod thats the onley way of login in to my box right now.. and no i cant change password on eny of the users or the root cuz i get promission denied.


but if i can creat a new root acc maby it wold solv the problem. o edit the master.passwd manualy. but that is what i have understud a very had task..



well for now im onley able to go in by singeluser mood or ssh to my user but then im not able to su.. and yes im in wheel.
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

You cannot edit master file directly; you need to use vipw, however, unless you are root it won't let you.


I sincerely doubt you are actually logging into single user mode -- that term does not imply you log in as yourself, even at the console itself, it means actually *booting* into single user mode.
* You have to be at the console
* You have to boot -s at the boot prompt
There is no question as to who is logging in with single-user mode; it always logs in as root. Likewise it does not ask for a password.

If you typed a username or a password in at all, you were NOT in single-user mode.

In single-user mode you have direct access to everything... let me repeat for clarity... EVERYTHING.

I suggest you try that again.
  • MISC/A++
  • Expert
  • Expert
  • User avatar
  • Posts: 508
  • Loc: UnderGround

Post 3+ Months Ago

i had a similar problem once and it took me 8 hours to fix it, nothing worked for me I have almost tried everything, I had to celebrate for the success; however my point is that

Linux single
Linux -l
Linux 1
Linux init=/bin/bash
Boot with CD and try accessing my passwd and shadow files but never allow me to edit even if you try to force it

mount -o remount,rw /...

still won't work, it did get my nerve though, I have tried accessing my bash, but vi won't work, so what I did is "after spending 8 hours" I did change the permission(using bash) of /etc/passwd and /etc/shadow then access my system with normal user account and modify my passwd & shadow.
  • ALV
  • Novice
  • Novice
  • User avatar
  • Posts: 30
  • Loc: swe

Post 3+ Months Ago

well i was in singel user mood.

booted in singel user mood from console and mounted the file system to rw and tryed to change the pass with passwd, chpass and vipw. but wth no scsess.. i cant get any kind of promission to the master files and i have allmost tryed everything.. ..
  • MISC/A++
  • Expert
  • Expert
  • User avatar
  • Posts: 508
  • Loc: UnderGround

Post 3+ Months Ago

just to keep on track, have you tried anything else except Linux single?
  • ALV
  • Novice
  • Novice
  • User avatar
  • Posts: 30
  • Loc: swe

Post 3+ Months Ago

im tired right now so i dont blame you if you don understand folowing:

i use freebsd and no i didnt use linux singel .

i have booted in singel user mood in freebsd ver 5.3 and have not ben able to change my root password cuz of a promission denied on /etc/maste.passwd
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

OK, ver 5.3, so you get to the Beastie menu, and you select option 4.

When it comes up you do the following;
Code: [ Select ]

fsck -p

mount -u /

mount -a -t ufs

swapon -a

  1. fsck -p
  2. mount -u /
  3. mount -a -t ufs
  4. swapon -a


Right?
If you do all of this and it still does not permit you to make changes, something else is off.

Also, if you forgot the root password, you can change it at the ok prompt after hitting '4' at the menu, just type
Code: [ Select ]
passwd root

and you will be permitted to change it.
  • ALV
  • Novice
  • Novice
  • User avatar
  • Posts: 30
  • Loc: swe

Post 3+ Months Ago

thats what i have done all the time. but i havnt realy done the mounting you did.. im gona try it..
  • ALV
  • Novice
  • Novice
  • User avatar
  • Posts: 30
  • Loc: swe

Post 3+ Months Ago

i have now done it the exact way you told me and i stil getting promission denied.


and when i use passwd i shuldnt have to write root afte after all im in suingel user mood and root is the onley user avileble. or maby im wrong..
  • ALV
  • Novice
  • Novice
  • User avatar
  • Posts: 30
  • Loc: swe

Post 3+ Months Ago

ther is somthing else making mr not able to login via consol i think.

cus i have repaced the master.passwd with som old backuppfile and it stil doesnt work.


i am able to login with my user via ssh but not in consolle and maby i am able to login to root via ssh if i enable it. ar maby not cuz i cant su with the user i have and it is in wheel.
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

I realize that English is a second (or even third) language for you, but I am finding it difficult to follow you.

How can you change the master.passwd file if you are not root? You must be root to do that.

If not, you have too many problems and I would consider starting over from the beginning. Reload, and try again.
  • MISC/A++
  • Expert
  • Expert
  • User avatar
  • Posts: 508
  • Loc: UnderGround

Post 3+ Months Ago

Code: [ Select ]
cus i have repaced the master.passwd with som old backuppfile and it stil doesnt work

Am lost here, this is really getting no where, I would say backup all your files and make a new installation and make sure you don’t mess with your root, yeah and I would agree with Daemonguy about your spelling mistakes, the spellchecker mod is been installed for a reason, I use it all the time!!
  • ALV
  • Novice
  • Novice
  • User avatar
  • Posts: 30
  • Loc: swe

Post 3+ Months Ago

well here is what i have done.._:
i have booted my bsd box with siegel use mood, and mounted all that i should i am now logged in as root. and then i'm trying to change my password but i don't have permission.



pleas ask if you don't understand me..
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

So now you *are* able to become root -- before you said you could not.

As root you are trying to change root's password?
You ran passwd as the root user?

If you ran passwd as root, and are unable to alter it -- which could be the drive requiring fsck'ing, or the fact you *replaced* the master.passwd file(bad), or any one of a hundred other things -- I would say, rebuild the box.
  • ALV
  • Novice
  • Novice
  • User avatar
  • Posts: 30
  • Loc: swe

Post 3+ Months Ago

you got me right. i have replaced the file and is rebuilding the onley way?

anf if fscj'ing is needed what do i do?




and as i said before. from ssh i can logon as my user not rott. nor su is possible.


and then i tryed to login with my use from consolle and no it didnt work.

i think culdnt it be somthing about the ttys ?
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

This feels like I am having my leg pulled.

ALV wrote:
i have booted my bsd box with siegel use mood, and mounted all that i should i am now logged in as root.


Now you are saying you cannot become root;
ALV wrote:
and as i said before. from ssh i can logon as my user not rott. nor su is possible.


and then i tryed to login with my use from consolle and no it didnt work.


I gave you several steps to complete.

I am done with this thread.
  • ALV
  • Novice
  • Novice
  • User avatar
  • Posts: 30
  • Loc: swe

Post 3+ Months Ago

i'm sorry i can simply not explain myself so that you understand..

i have done all the steps you posted.

Post Information

  • Total Posts in this topic: 23 posts
  • Users browsing this forum: No registered users and 58 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.