LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-31-2012, 02:08 AM   #1
Aerosilver
LQ Newbie
 
Registered: Aug 2012
Posts: 28

Rep: Reputation: Disabled
Change password of new user


Hi,

I have a doubt with a new user. I want to change his password with the command "usermod -p $newpass $user".
The password is changed, but when I try to login with that user, the system say "Wrong password" or something like that.

Is that the correct way to change a password? I don't wanna use the passwd $user. Is very unpersonalized..

Thanks.
 
Old 08-31-2012, 02:15 AM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,864
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
try 'passwd <username>' or something like that.
 
Old 08-31-2012, 02:16 AM   #3
Aerosilver
LQ Newbie
 
Registered: Aug 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by NevemTeve View Post
try 'passwd <username>' or something like that.
I don't want to use the passwd because is in english and is unpersonalized. I want to create my own prompted "passwd" with the usermod, but this is not working.
 
Old 08-31-2012, 02:21 AM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,864
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
The root-user of a computer is supposed to understand English... but if they don't, just set LANG environment:

Code:
LANG=hu_HU passwd
zsiga jelszavának megváltoztatása.
A (jelenlegi) UNIX jelszó:
...
PS: If you read the manual, it tells you that usermod -p expects encrypted password, not plain-text.

Last edited by NevemTeve; 08-31-2012 at 02:23 AM.
 
2 members found this post helpful.
Old 08-31-2012, 02:33 AM   #5
Aerosilver
LQ Newbie
 
Registered: Aug 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by NevemTeve View Post
The root-user of a computer is supposed to understand English... but if they don't, just set LANG environment:

Code:
LANG=hu_HU passwd
zsiga jelszavának megváltoztatása.
A (jelenlegi) UNIX jelszó:
...
PS: If you read the manual, it tells you that usermod -p expects encrypted password, not plain-text.
Ok. I modified the LANG and it's in spanish, but anyway I wanted to personalize my "password changer".
Do you know how to send a encrypted password?
Something like this?:

Code:
usermod -p ENCRYPT($pass) $user
 
  


Reply



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
Ubuntu 11.04 encrypted LVM password not working after user login password change prateekm21 Linux - Security 0 10-29-2011 01:20 PM
Create user add file with default password and force user to change it? Morgandy Linux - Newbie 3 02-02-2010 05:06 PM
Cannot change root password (let alone standard user's password) jbottiger Red Hat 4 01-06-2009 08:03 PM
Locking out a user when password expires, but allowing them to change their password kaplan71 Linux - Security 5 06-27-2008 07:12 PM
samba(global security=user) useful tools for client.ex: user change password. hocheetiong Linux - Newbie 1 03-18-2008 09:20 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:11 PM.

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
Open Source Consulting | Domain Registration