LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-29-2010, 02:47 AM   #1
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Rep: Reputation: 59
User Account without a Password


How to allow a user to login without entering a password?

If my question sounds wierd then check out m-net at www.arbornet.org/m-net.php and see how it works.

Telnet / SSH to m-net.arbornet.org and type in newuser and it won't prompt for a password.

Any ideas?
 
Old 12-29-2010, 03:02 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
just delete their password: passwd -d
 
Old 12-30-2010, 04:14 AM   #3
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Why do you want to do so? Using SSH with an ssh-agent wouldn't be an option? Anyway, besides removing the password entry in /etc/shadow, it might also be necessary to adjust in one file in /etc/pam.d to be sure that:

auth required pam_unix2.so nullok

has the nullok option.
 
Old 12-30-2010, 04:26 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well I can see reasons, especially with an account called "newuser"... if it's by extreme exception, and the account is tied to well written provisioning scripts then fine.
 
Old 12-30-2010, 06:38 AM   #5
Aneeshvm123
Member
 
Registered: Aug 2008
Location: Kerala
Distribution: Redhat Linux
Posts: 30

Rep: Reputation: 0
If you want to remove password of a user you can use passwd -d <username>.

Regards,
Aneesh V.M
 
Old 12-30-2010, 06:43 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by Aneeshvm123 View Post
If you want to remove password of a user you can use passwd -d <username>.

Regards,
Aneesh V.M
Been there, said that. ;-)
 
Old 01-04-2011, 02:56 PM   #7
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by acid_kewpie View Post
Been there, said that. ;-)


I created a user demo and assigned a default password to it. On a different terminal logged in using the login name demo and supplied the password. Things went fine as they would.

To enable the user demo login without entering the password, I did what you said:

Code:
-bash-2.05b# passwd -d demo
Removing password for user demo.
passwd: Success
-bash-2.05b#
I am still required to enter the password:

Code:
login as: demo
demo@linuxzoo.net's password:
[demo@host-6-121 demo]$
and am able to login.

I don't want any password for the user "demo" so that it can login without any password.

I am not familiar with the PAM thing.
 
Old 01-04-2011, 03:50 PM   #8
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
The PAM thing we have to adjust later. It should simply refuse login for empty passwords by default - although it asks for one, it will always deny access. You are on which OS in detail?

What is the entry for your demo user in /etc/shadow? Are you using NIS, where the old password setting might be still be in it's database (and so removing the password wouldn't act instantly)?
 
Old 01-05-2011, 06:53 AM   #9
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by Reuti View Post
You are on which OS in detail?
Code:
-bash-2.05b# uname -a
Linux host-6-113.linuxzoo.net 2.6.18.1 #5 Thu Nov 30 12:51:52 GMT 2006 i686 i686 i386 GNU/Linux
-bash-2.05b# cat /etc/issue
Fedora Core release 2 (Tettnang)
Kernel \r on an \m
Quote:
What is the entry for your demo user in /etc/shadow?
Code:
-bash-2.05b# grep ^demo /etc/passwd
demo:x:500:500::/home/demo:/bin/bash
-bash-2.05b# grep ^demo /etc/shadow
demo::14978:0:99999:7:::
-bash-2.05b#
Quote:
Are you using NIS, where the old password setting might be still be in it's database (and so removing the password wouldn't act instantly)?
Code:
No. It is the same server / system.
 
Old 01-05-2011, 07:39 AM   #10
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
When I get you right: it's still asking for a password and you get access by entering the last known one, despite the fact that you deleted the password in the meantime - correct?

NIS can also operate local, do you have something like /var/yp/ ?
 
  


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
Evolution: prompts password for user account tanveer Ubuntu 5 01-21-2008 07:06 AM
maximum password age in a user account mlu Linux - Security 2 04-28-2005 06:35 AM
ftp user account password.... tosszafer Linux - Security 1 10-30-2004 06:05 PM
User account problem (why incorrect password? -- but it is right!!!) namgor Linux - Software 0 07-15-2004 02:17 PM
Forgot my user account password Gilbert Linux - Newbie 1 02-22-2004 11:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:38 AM.

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