LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-14-2013, 07:55 PM   #1
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Rep: Reputation: Disabled
Directly supply the encrypted password


Hello to all ;

I tried to create encrypted password when creating a user.
My system doesn't support me. I googled more options to use -p with useradd. i am getting command not found error.

>> OS VERSION >>
PHP Code:
# uname -a
Linux testorcl 2.6.9-42.0.0.0.1.ELsmp #1 SMP Sun Oct 15 14:02:40 PDT 2006 i686 athlon i386 GNU/Linux 
I know this is outdated. I would like to work on OEL only. please help me how to resolve my problem.

Quote:
# useradd -p user120 xxxx
i entered only four x(xxxx) only. but i cant use user120 account.Always showing incorrect password.
 
Old 01-15-2013, 12:45 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
That's because the passwd must come after the -p option
Code:
useradd -p passwdxxx user120
BUT as per here http://linux.die.net/man/8/useradd, it must already be encrypted.

You could use
Code:
echo plaintext | passwd --stdin user120
 
2 members found this post helpful.
Old 01-15-2013, 04:51 AM   #3
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Original Poster
Rep: Reputation: Disabled
Hello Chrism01;

I did both commands i did n't throw any error.
but again showing incorect pasword.

#useradd -p passwdxxx user120

Quote:
#echo plaintext | passwd --stdin user120
Changing password for user user120.
passwd: all authentication tokens updated successfully.
From oracle user i issue following command

Quote:
$su - user120
Password:
su: incorrect password
 
Old 01-15-2013, 07:09 AM   #4
nigelbarker
LQ Newbie
 
Registered: Feb 2011
Posts: 7

Rep: Reputation: 1
May sound daft, but what's wrong with :-
useradd user120
passwd user120

(I'm assuming you have root access).

Regards your command I believe it should be :-

# useradd -p xxxx user120

Nige
 
Old 01-15-2013, 01:11 PM   #5
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Original Poster
Rep: Reputation: Disabled
Hello to all

Sorry for disturbing everyone here. Help me to findout error.
I am not expert in linux So i could n't trouble shoot when facing Errors.

>> I tried to move contents from home/sony to new hom path >>

Quote:
# usermod -d /home1/sony sony
# su - sony
su: warning: cannot change directory to /home1/sony: No such file or directory
-bash-3.00$
>> This command also n'ty working >>

Quote:
# useradd -p passwdxxx user120
when i issue su - usr120
it showing incorrect password.
 
Old 01-15-2013, 05:24 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
1. passwd: difficult to see what the problem is. Its worth noting Unix/Linux is case sensitive(!) for everything.
I'd suggest doing
Code:
passwd user120
as root and creating a very simple passwd eg abc for now, just to prove it.

As above, you can't use the useradd -p unless the 'password' you supply is already encrypted.
Use one of the other methods and supply the plain/non-encrypted version.

2. home dir; the usermod cmd edits the /etc/passwd file only. To create the dir (or move it if it already exists), you'll need the -m option. See man page http://linux.die.net/man/8/usermod
 
  


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
How to supply password at boot after installing new kernel version bit4 Linux - Wireless Networking 1 01-06-2012 06:25 AM
Ubuntu 11.04 encrypted LVM password not working after user login password change prateekm21 Linux - Security 0 10-29-2011 01:20 PM
Encrypted Password alejandroye Linux - Security 2 03-01-2006 02:12 PM
Suse 9.1 Incorrect root password directly after install pinniewooh Linux - Laptop and Netbook 5 10-01-2004 01:04 AM
encrypted password 64 characters? uribo Programming 1 04-22-2003 07:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:32 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