Unprivileged User's Account Without a Password

Reber, Simon simon.reber at roche.com
Wed May 27 08:08:48 UTC 2009


I strongly suggest to setup the user using # useradd -r

man useradd ...
-r     This flag is used to create a system account. That is, a user
with a UID lower than the value of UID_MIN defined in /etc/login.defs
and whose password does not expire. Note that useradd will not create a
home directory for such an user, regardless of the default setting in
/etc/login.defs.  You have to specify -m option if you want a home
directory for a system account to be created.  This is an option added
by Red Hat.

You are then still able to specify usual useradd options (such as
defined UID etc.)

In addition would I suggest to use sudo which will help you switch to
this particular user (instead of su)
Using sudo has also the benefit that each activity is logged and can
therefore be traced back.

In case you also need to have the ability of remote login using ssh can
you use ssh private/public key to avoid password usage.
	(but I do not suggest that due to security issues ... or at
least set it up correctly)

Cheers,
Simon

>-----Original Message-----
>From: redhat-list-bounces at redhat.com 
>[mailto:redhat-list-bounces at redhat.com] On Behalf Of Santosh Kumar
>Sent: Wednesday, May 27, 2009 8:42 AM
>To: General Red Hat Linux discussion list
>Subject: Re: Unprivileged User's Account Without a Password
>
>You may try  passwd -d <UserName> which will delete user 
>password and will
>not ask at the time of login.
>
>On Wed, May 27, 2009 at 10:35 AM, Ka kkar <vijay1313 at gmail.com> wrote:
>
>> On Wed, May 27, 2009 at 2:25 AM, Devarishi Kumar Mahadeva <
>> dk_mahadeva at yahoo.com> wrote:
>>
>> > Hi,
>> >
>> >
>> > Can we have an unprivileged user's account without any 
>password such that
>> > the user can still login and perform tasks in the same way 
>he or she
>> would
>> > do by entering a valid password.
>> >
>> > Well, as I am aware of it that when we create a user's 
>account by giving
>> > the following command:
>> >
>> > #useradd <UserName>
>> >
>> > We don't have to set a password for that account at this 
>state. But if we
>> > try to log in using that user name we are prompted to enter a valid
>> > password. We can't log in without a password set for that account.
>> >
>> > So, is there any way to overcome it?
>> >
>> >
>>
>> it is not a good idea to login without password but still if 
>some case you
>> want to login without password or without being prompted for 
>the password
>> remove the :x: from /etc/passwd file.this :x: parameter 
>checks /etc/shadow
>> for the users password,when you remove this x it would not check the
>> /etc/shadow & you would be able to login without password.
>>
>>
>> Thanks
>> kakkar
>>
>> >
>> >
>> >
>> >
>> >
>> > --
>> > redhat-list mailing list
>> > unsubscribe 
>mailto:redhat-list-request at redhat.com?subjectunsubscribe
>> > https://www.redhat.com/mailman/listinfo/redhat-list
>> >
>>
>>
>>
>> --
>> ~~~ 0Pen ~~~ S0uRce ~~~
>> --
>> redhat-list mailing list
>> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
>> https://www.redhat.com/mailman/listinfo/redhat-list
>>
>
>
>
>-- 
>To accomplish great things, we must dream as well as act.
>-- 
>redhat-list mailing list
>unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
>https://www.redhat.com/mailman/listinfo/redhat-list
>




More information about the redhat-list mailing list