answersLogoWhite

0


Best Answer

Hmm... The recommended method of changing your password on Linux (or Unix for that matter), is to use the passwd command.

To change another user's password, switch user to rootand issue the command:

# passwd other_user

Your question seems to indicate that you really want to directly edit your passwd and shadow files on your Linux distribution. Unless you really, really know what you're doing, I recommend against this.

If you do know what you're doing, use the vi (or other editor - vi is the best editor ever made though) editor and directly edit your /etc/passwd and /etc/shadow files.

Of course, should you subsequently discover you can no longer access your system, it may behoove you to go back to your Linux/Unix basics and begin all over again. May I suggest, as an excellent starting point, learn all that you can about the world's most wonder editor, the editor vi. :)

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

That depends entirely on what the file is, and if you have a preferred editor for the job.

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

passwd

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Which command do you use to edit password file in Linux?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you edit an inode in Linux since everything in Linux is a file?

You don't edit inodes manually. They are managed by the file system driver.


What Linux command sets a files permission?

In Linux the chmod command is used to set file permissions.


How do you edit a password protected powerpoint file?

You need to find the password to unlock the file. However, there are several program available to remove the password.


Simplest utility for viewing file content?

The simplest utility for viewing file content in the Linux Terminal, (Terminal as command promt also called DOS in Windows) its called the file command. The simplest utility for viewing file content in the Linux Terminal, (Terminal as command promt also called DOS in Windows) its called the file command.


How do you use less command in Linux?

Viewing a file:"less [filename]"viewing the standard output of a command:"[command] | less"


What is the mount command in Linux?

The mount command instructs the kernel to access the file system on a partition or device.


What command in Linux do you use run an executable file?

if the file is allready runnable you can type in the terminal: ./filename


What command in Linux do you use to run executable file?

if the file is allready runnable you can type in the terminal: ./filename


Can you use password in vi editor?

The 'vi' editor is a text editor; it can edit anything that is displayable ASCII text. You can edit a password in the password file using 'vi' (not recommended).


Which Linux command is used to copy a file?

in terminal it is : #cp file_a file_b


How do you change the executable bit in Linux for a .exe file?

chmod +x is the command to set the executable flag in Linux but, Linux does not use exe files.


What does the cat command do in Linux?

print the contents of a text file onto the screen (like the "type" command in DOS).