LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 08-18-2005, 10:14 AM   #1
Jude Lucien
LQ Newbie
 
Registered: Jul 2005
Distribution: Debian Sarge
Posts: 18

Rep: Reputation: 0
Password Problems With useradd


I am running Sarge, and this is the first time I have tried to add new users.

I did:

useradd -m fred

and fred was created for me. I could then su - fred from root and it changed straight to fred without asking me for a password. When I tried to set a password by just typing "passwd" as fred I was asked for the current password, which I didn't have, so now the only way I can be fred is to su from root.

I then tried:

useradd -m -p bob bob

and the same thing happened. So now I need to know what I did wrong and how to fix bob and fred so they can login as themselves, because according to the useradd man page, I don't know where I went wrong.

Cheers,
Jude.
 
Old 08-18-2005, 10:17 AM   #2
PenguinPwrdBox
Member
 
Registered: Oct 2003
Location: /illinois/chicago
Distribution: Slackware/Gentoo/FC/RHEL
Posts: 568

Rep: Reputation: 30
Firstly - don't su.

CTRL-D back out to a login - and login as fred to change the passwd, or, as root:

passwd fred

This should allow you to change it.

If that doesn't work - hand edit /etc/shadow, and remove everything in between the first pair of colons on the line that begins with fred.
 
Old 08-18-2005, 10:40 AM   #3
Jude Lucien
LQ Newbie
 
Registered: Jul 2005
Distribution: Debian Sarge
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks. passwd fred as root did the trick.

Is there a way to avoid that in the future and and to be able to successfully set a password with useradd?
 
Old 08-18-2005, 10:41 AM   #4
PenguinPwrdBox
Member
 
Registered: Oct 2003
Location: /illinois/chicago
Distribution: Slackware/Gentoo/FC/RHEL
Posts: 568

Rep: Reputation: 30
useradd -p password username
 
Old 08-18-2005, 10:44 AM   #5
Jude Lucien
LQ Newbie
 
Registered: Jul 2005
Distribution: Debian Sarge
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks for your help.
 
  


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
useradd without shadow password twallstr Linux - Software 1 09-08-2005 02:14 PM
set logon password without useradd? ldp Linux - Security 2 01-22-2005 07:12 PM
"useradd: unable to lock password file" need help monzter Programming 1 08-16-2004 12:59 AM
few problems (useradd, gDesklets) pureevil4 Slackware 4 04-12-2004 12:48 PM
useradd problems on RH 9.0 orenco Linux - Distributions 14 08-27-2003 10:14 AM


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

Main Menu
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