Wasn't meant to be. We get "help I forgot the root password" posts all the time but almost never get asked without at least telling us anything at all about situation. your unix? which unix? Syntax of lines in /etc/passwd is:
When the password hash is x, that means it's stored somewhere else, possibly /etc/shadow. It's not stored plaintext, but as an unrecognizable hash. When someone tries to login, it hashes what they type and compares the hashes.
You don't edit any of these files yourself, you use the passwd command. See 'man passwd'.
Thanks And sorry if I was rud to you to. And thanks for all the other replays.
I went down in det shadow file and found this:
root:$1$Oaj/9dOP$RzZBTVpfYril1tW9.QsDO/:10957:0::::: //the hash is cahnged so if you crack it good work
Is the led here the same as in the last one: usernameasswordhash:uid:gid:undefined:homedir:loginshell
Mostly the same, but this isn't a standard the way /etc/passwd is. It'd be defined by shadow or whatever other program you have does this. The entries are seperated by :. The first two are username and password hash. With the rest of the information available in /etc/passwd, the other fields probably don't mean much. I don't know what the 10957 is but that's sure not root's uid or gid.
Root definitely has a password already, whatever it is.
How did you see that? The whole point of keeping /etc/shadow seperate is so that you can restrict it to root-only.
Last edited by Corona688; 10-18-2006 at 03:16 PM..
...the other fields probably don't mean much. I don't know what the 10957 is but that's sure not root's uid or gid.
My man page on "shadow" describes a C struct which has fields that correspond to the /etc/shadow file. What threw me off initially is that these fields are in days, not seconds, since the epoch.
OK, I have reinstalled my UNIX and this is what I got.
I go in the terminal and type cd .. cd .. etc to I come to det folder etc in this one I type sudo cat etc and get this: (I only use the root as exampels )
But someone did say something about the shadow file? right?
So I try that one... And get this:
So I am a littel confjused now... Where can I find the password hash?
Our have i found it in the shadow file. Is it only me that dident se the hash, and what kind is it?
NB: The examples are un changed. If someone find the password dosent matter. I used a exampel password.
Thanks for helping me with this. And for evry one that have been giving med good advice and exampels.
Basically, it's the output of an obfuscation mechanism. The string of characters after "root:" is not the actual password. The actual password is represented by a fixed string of characters that only means something useful to the security/authentication mechanisms built into the system.
The password has been hashed (see link above).
So it is not trivial to get the root password if it is forgotten (or someone wants to try to steal the password from the files you've been looking at).
So I am a littel confjused now... Where can I find the password hash?
It's this bit:
Yes, it looks like garbage. That's kind of the point
Quote:
Our have i found it in the shadow file. Is it only me that didn't see the hash, and what kind is it?
It may be old-fashioned UNIX crypt(), but these days they're switching over to the more secure MD5.
See the linux shadow password HOWTO. It's a bit out of date, particularly in that I don't know of a Linux system that doesn't use shadow by now, but it's a good outline of the what and why.
Hi
I'd like to ssh from an AIX OS server ( v5.3) to a Fabric OS server ( v6.1.2 ) without password.
I tried using dsa or rsa keys but it didn't work, the aix server still asked for the password.
Somebody help, please :(:(:( (8 Replies)
Can someone help in writing some script through which I can transfer file (scp) from root user in abc server to crt user in hfg server and can give the crt user password in script itself so that it doesn't prompt me every time for password (4 Replies)
Hi ,
I am using redhat linux 5.I.I need a command or script which need to login from one server to another without asking password.This can be done even providing password on the command line is also fine.I have tries sshpass but it didn't work.ssh key generations is not preferred here.
... (7 Replies)
Hi,
I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script.
Can anyone help me in automating the script such that it... (3 Replies)
Hi All,
Let me know how can i find and delete files from one unix server to another unix server which are 'N' days older.
Please note that I need to delete files on remote unix server.So, probably i will need to use sftp, but question is how can i identify files and folders which are 'N'... (2 Replies)
Hi Gurus,
I'm a unix newbie and I would like to connect to multiple unix servers from unix server using shell script i.e from server a to server b,c,d etc. I want to copy the files from unix server a to server b, c, d. I can access staright using ssh without the need to have password and user... (5 Replies)
Hi
We have over 100 unix servers. They include linux,solaris,aix,hp and sgi. I use telnet for some and ssh for rest. Note: none of this server has expect which i can use to update.So i am looking for expert who can help me with their script or guide me write KSH script to automate this.
Thank... (6 Replies)
Hi,
I would like to connect UNIX server to UNIX server through shell scripts
and i have some concepts . But i am totally confused how to connect UNIX
server to UNIX server throuth running a script. It will be greatful to me if
any buddy will help me.
Thanks in advance.
Phatan:) (2 Replies)
--------------------------------------------------------------------------------
How can I tranfer an OS/ Unix (from old HD to new HD / include all files saved )
Could anyone help me out. :confused:
Thanks (0 Replies)
I inhereted a project server that has UNIX installed with a SCO OS. I am trying to learn UNIX but I cannot go beyond the password and login. The original engineers have left the company and nothing was ever written down. How can access our server? (1 Reply)