FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 12-04-2007, 05:24 AM
"Deepak Shrestha"
 
Default useradd anomaly - GUI or command line???

Hi,

I am trying to add new users in my FC8 machine.

As root I issued command
# groupadd zion
# useradd -c "Some User" -m -g zion -p secret666 someuser

now If try to login from console is unsuccessful
===================
login: someuser
Password: secret666

gives me

login Incorrect
==================

I open the GUI user manager and remove the currently created user and
added the user the same name and password and added him to the zion
group.
Now i can login with that name and password noramally.

My Question
=========
Is there something broken in command line tool "useradd"?

Thanks

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-04-2007, 05:36 AM
Ed Greshko
 
Default useradd anomaly - GUI or command line???

Deepak Shrestha wrote:
> Hi,
>
> I am trying to add new users in my FC8 machine.
>
> As root I issued command
> # groupadd zion
> # useradd -c "Some User" -m -g zion -p secret666 someuser
>
> now If try to login from console is unsuccessful
> ===================
> login: someuser
> Password: secret666
>
> gives me
>
> login Incorrect
> ==================
>
> I open the GUI user manager and remove the currently created user and
> added the user the same name and password and added him to the zion
> group.
> Now i can login with that name and password noramally.
>
> My Question
> =========
> Is there something broken in command line tool "useradd"?

No....

Read the man page for useradd and pay close attention to the -p parameter.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-04-2007, 06:17 AM
"Deepak Shrestha"
 
Default useradd anomaly - GUI or command line???

> No....
>
> Read the man page for useradd and pay close attention to the -p parameter.

Man page says
======================
-p, --password PASSWORD
The encrypted password, as returned by crypt(3). The default is to
disable the account.
======================

So that means the newly created user is disabled by default?

I am asking this because I am new to linux administration stuff. Most
of the time I am using as personal desktop.

Thanks

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-04-2007, 06:22 AM
Ed Greshko
 
Default useradd anomaly - GUI or command line???

Deepak Shrestha wrote:
>> No....
>>
>> Read the man page for useradd and pay close attention to the -p parameter.
>
> Man page says
> ======================
> -p, --password PASSWORD
> The encrypted password, as returned by crypt(3). The default is to
> disable the account.
> ======================
>
> So that means the newly created user is disabled by default?
>
> I am asking this because I am new to linux administration stuff. Most
> of the time I am using as personal desktop.

No... It meas that the password provided must already be in encrypted
format. "The encrypted password, as returned by crypt".

You can see the results of your command by looking in /etc/shadow after you
use the "useradd" command. You will see the password field contains
"secret666".

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-04-2007, 06:30 AM
"Deepak Shrestha"
 
Default useradd anomaly - GUI or command line???

> No... It meas that the password provided must already be in encrypted
> format. "The encrypted password, as returned by crypt".
>
> You can see the results of your command by looking in /etc/shadow after you
> use the "useradd" command. You will see the password field contains
> "secret666".

in /etc/shadow

I can see the password of newly created user through useradd in plain
text (as you said) but the user password of other users created from
GUI is encrypted (something like $lkd090s909.......).

what does that mean and how can I make that user to be able to log in?

Thanks

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-04-2007, 07:05 AM
Ed Greshko
 
Default useradd anomaly - GUI or command line???

Deepak Shrestha wrote:
>> No... It meas that the password provided must already be in encrypted
>> format. "The encrypted password, as returned by crypt".
>>
>> You can see the results of your command by looking in /etc/shadow after you
>> use the "useradd" command. You will see the password field contains
>> "secret666".
>
> in /etc/shadow
>
> I can see the password of newly created user through useradd in plain
> text (as you said) but the user password of other users created from
> GUI is encrypted (something like $lkd090s909.......).
>
> what does that mean and how can I make that user to be able to log in?

Well....

You could use a script such as the one found at
http://sial.org/howto/perl/password-crypt/crypt-example to generate the MD5
encrypted password and then place the md5 result as the parameter specified
in -p. But, you'd have to be careful to escape certain character...such as
the $.

I guess the question is...what are you trying to achieve?


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-04-2007, 07:21 AM
Todd Zullinger
 
Default useradd anomaly - GUI or command line???

Deepak Shrestha wrote:
>> No... It meas that the password provided must already be in
>> encrypted format. "The encrypted password, as returned by crypt".
>>
>> You can see the results of your command by looking in /etc/shadow
>> after you use the "useradd" command. You will see the password
>> field contains "secret666".
>
> in /etc/shadow
>
> I can see the password of newly created user through useradd in
> plain text (as you said) but the user password of other users
> created from GUI is encrypted (something like $lkd090s909.......).
>
> what does that mean and how can I make that user to be able to log
> in?

Use the passwd command to properly set the users password. As root,
type "passwd username" (for whatever username you want to set the
password for).

--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
Between two evils, I always pick the one I never tried before.
-- Mae West

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-04-2007, 07:58 AM
John Summerfield
 
Default useradd anomaly - GUI or command line???

Deepak Shrestha wrote:

No... It meas that the password provided must already be in encrypted
format. "The encrypted password, as returned by crypt".

You can see the results of your command by looking in /etc/shadow after you
use the "useradd" command. You will see the password field contains
"secret666".


in /etc/shadow

I can see the password of newly created user through useradd in plain
text (as you said) but the user password of other users created from
GUI is encrypted (something like $lkd090s909.......).

what does that mean and how can I make that user to be able to log in?

Thanks


man mkpasswd

Note that Debian has a different mkpasswd.


--

Cheers
John

-- spambait
1aaaaaaa@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-04-2007, 08:54 AM
"Deepak Shrestha"
 
Default useradd anomaly - GUI or command line???

> I guess the question is...what are you trying to achieve?

I am just trying to add some users for my FC box so that they can log
in and start using it. Also trying to learn the command line tools to
do that.

> Use the passwd command to properly set the users password. As root,
> type "passwd username" (for whatever username you want to set the
> password for).

Well this solved the problem. After creating the user, I had to issue
again passwd command to create/change/encrypt password and the user
can now login. Also in /etc/shadow file the users password is
encrypted.

Thanks for all the suggestions. ;-)

Actually I am following the example from a book. It is not clearly
mentioned about the password encryption thing, so I was king of
expecting that user can be created in single command line like what I
have posted before. So that means GUI user manager does this in two
separate steps, I guess (create user, create password) right?

Thanks again.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 10:00 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org