LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices



Reply
 
Search this Thread
Old 02-04-2005, 12:49 AM   #1
wardialer
Member
 
Registered: Sep 2004
Distribution: SUSE Linux Pro 9.3
Posts: 375

Rep: Reputation: 30
Changing Usernames/password command?


I have not changed my 'root' and my account passwords for a long time now. Could someone please explain to me on how to change the 'root' password and the regular 'user' password???

What are the commands for both the ROOT and USER account??? I want to these commands in my notes that I had archived.

I would appreciate it very very much. Im running Mandrake Linux.
 
Old 02-04-2005, 01:19 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
passwd is the command line utility for changing passwords.

If you run it as a user without no options it changes the password for that user. If you run it as root with a username as a parameter you can set the password for that user.

See the passwd(1) man page for more information. The passwd(5) man page deals with the password file itself.
 
Old 02-04-2005, 01:43 AM   #3
student04
Member
 
Registered: Jan 2004
Location: Georgia
Distribution: OS X, CentOS
Posts: 669

Rep: Reputation: 34
And here would be an example

Normal user changing their own password (same goes for root)
Code:
[alex@enterprise alex]$ passwd
Changing password for user alex.
Changing password for alex
(current) UNIX password:
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[alex@enterprise alex]$
Root changing another user's password (syntax is just "passwd <username>")
Code:
[root@enterprise alex]# passwd alex
Changing password for user alex.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@enterprise alex]#
I love being so exact....

 
Old 02-04-2005, 06:35 AM   #4
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 288

Rep: Reputation: 30
I think you can make users change their password by using the chage command.
man chage.


" chage [-l] [-m min_days] [-M max_days] [-W warn]
[-I inactive] [-E expire] [-d last_day] user


changes the number of days between password changes and the date of the last password change. This information is used by the system to determine when a user must change her password "
 
Old 02-04-2005, 10:08 AM   #5
dOEPain
LQ Newbie
 
Registered: Sep 2003
Location: Boston-MA
Distribution: Debian 4
Posts: 8

Rep: Reputation: 0
passwd Command.

Log in as root, and type in passwd, and you will be prompted for your new password, and then will have to confirm it.
 
Old 02-25-2005, 10:44 PM   #6
wardialer
Member
 
Registered: Sep 2004
Distribution: SUSE Linux Pro 9.3
Posts: 375

Original Poster
Rep: Reputation: 30
I am still very lost here.

I want to CHANGE MY ROOT PASSWORD!!!!!!! How can I do this????

And I want to also change my User account password

So, if I do a 'su' command and wanted to change the root password then whats next?

But If I wanted to change my own account's password, then I would do it WITHOUT the 'su' command? Like this below?

Changing root password:
su>ENTER
password for root (which would be my current root password)
and then I type 'passwd' (without the user syntax)

Am I right???

But for changing my OWN ACCOUNT I would have to add the username syntax, right?

Please give me one more example please.

So when I change password for root, I would have to do this:

'passwd root' or just 'passwd'

or If I wanted to change my own username, it would be like this?

'passwd myusername' or only 'passwd'

The example was very very confusing. Please give me another example please.

Last edited by wardialer; 02-25-2005 at 10:49 PM.
 
Old 02-25-2005, 11:56 PM   #7
student04
Member
 
Registered: Jan 2004
Location: Georgia
Distribution: OS X, CentOS
Posts: 669

Rep: Reputation: 34
Ok it was basically answered for you a million times... but here it is again

To become root when you are a normal user, open a console, and type the following command: "su". This stands for "super user". To exit from it, type "exit".

1 -- WHEN YOU ARE A NORMAL USER:
enter this command to change the normal user's password: "passwd"

2 -- WHEN YOU ARE ROOT:
enter this command to change root's password: "passwd"

3 -- You cannot change another user's password as a NORMAL user.

4 -- You CAN change another user's password if you are root, and this is how:
enter this command to change another user's password if you are logged in as root:
"passwd <theuser>" where <theuser> is the user's username.

I think this is pretty obvious and you would have figured it out on your own if you just gave it a shot, and THEN asked again. Plus, many useful tips were already given, plus i gave you what it looks like for number 1, and for number 4 from my own computer.

Last edited by student04; 02-25-2005 at 11:59 PM.
 
Old 02-26-2005, 01:15 AM   #8
wardialer
Member
 
Registered: Sep 2004
Distribution: SUSE Linux Pro 9.3
Posts: 375

Original Poster
Rep: Reputation: 30
Ok, now I got it. Thanks.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
password changing bshearer *BSD 3 04-26-2005 11:13 AM
Password keeps changing Capt Linux - Newbie 0 10-13-2004 07:29 PM
Changing Password sandiegon Linux - General 2 10-23-2003 01:43 PM
Changing password ust Linux - Software 1 10-03-2003 05:18 AM
Squid usernames, groups, password barDo Linux - Networking 1 02-18-2002 11:35 PM


All times are GMT -5. The time now is 05:52 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration