OVH Community, your new community space.

Change Root password?


Mr-E-Mann
02-06-2008, 00:18
Quote Originally Posted by iamthebest
Anyway to list all users who have an account?
Assuming you are running some flavour of linux, a cheeky peek into /etc/passwd will help

... from http://www.redhat.com/docs/manuals/l...rps-files.html

/etc/passwd

The /etc/passwd file is world-readable, and contains a list of users, each on a separate line. On each line is a seven field, colon delimited list which contains the following information:

*Username — The name the user types when logging into the system.
*Password — This contains the encrypted password for the user (or an x if shadow passwords are being used — more on this later).
*User ID (UID) — The numerical equivalent of the username which is referenced by the system and applications when determining access privileges.
*Group ID (GID) — The numerical equivalent of the primary group name which is referenced by the system and applications when determining access privileges.
*GECOS — The GECOS[1] field is optional, and is used to store extra information (such as the user's full name). Multiple entries can be stored here in a comma delimited list. Utilities such as finger access this field to provide additional user information.
*Home directory — The absolute path to the user's home directory, such as /home/juan.
*Shell — The program automatically launched whenever a user logs in. This is usually a command interpreter (often called a shell). Under Red Hat Linux, the default value is /bin/bash. If this field is left blank, bin/sh is used. If it is set to a non-existent file, then the user will be unable to log into the system.

Here is an example of a /etc/passwd entry:

root:x:0:0:root:/root:/bin/bash

This line shows that the root user has a shadow password, as well as a UID and GID of 0. The root user has /root/ as a home directory, and uses /bin/bash for a shell.

For more information about /etc/passwd, type man 5 passwd.

iamthebest
01-06-2008, 17:19
Thanks for the help ;>

Anyway to list all users who have an account?

w00t
01-06-2008, 16:35
Quote Originally Posted by iamthebest
How can I change my server Root password?
Boot into rescue mode and do this command

passwd root

[hit enter]

enter the new password

[hit enter]

Re-enter new password

[hit enter]

then reboot the machine

"that is ofcourse if u forgot your password" lol

Palad1n
01-06-2008, 16:34
type : 'passwd' when logged in as root
'sudo passwd root' if logged in as someone else.

iamthebest
01-06-2008, 16:33
How can I change my server Root password?