LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-20-2003, 03:03 PM   #1
danahata
Member
 
Registered: Aug 2003
Posts: 30

Rep: Reputation: 15
how to login as user who has no password


I created a user called 'pcguest' (for samba), and when prompted for a password, I just hit enter. Now, I tried to login as that user using 'su - pcguest', and when prompted for the password, I just hit enter, and I get the incorrect password message. Anyone know how (or if) I can log in with this user?

Dana
 
Old 08-20-2003, 03:24 PM   #2
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
if you dont want the user to have a password you need to edit the users entry in /etc/passwd, as root edit /etc/passwd, find the row with his name in, it should look something like this

kev82:x:100:100::/home/kev82:/bin/bash

you are interested in the second field, it might not say x, depends if you have shadow passwords enabled or not, but if this field is empty you will not be prompted for a password for this user, so change it to

kev82::100:100::/home/kev82:/bin/bash

obviously the names and numbers will be different on your system

you can find out all about this file by typing 'man 5 passwd' at a command prompt.
 
Old 08-20-2003, 05:41 PM   #3
lfur
Member
 
Registered: Jul 2003
Location: Slovenia
Distribution: Slackware & FreeBSD
Posts: 209

Rep: Reputation: 30
Quote:
if you dont want the user to have a password you need to edit the users entry in /etc/passwd
... and /etc/shadow ... if you are using it.
 
Old 08-20-2003, 05:49 PM   #4
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
Quote:
... and /etc/shadow ... if you are using it.
you dont actually, if the second field in /etc/passwd is blank it logs you in regardless of the contents of /etc/shadow
 
Old 08-20-2003, 05:57 PM   #5
lfur
Member
 
Registered: Jul 2003
Location: Slovenia
Distribution: Slackware & FreeBSD
Posts: 209

Rep: Reputation: 30
It skips the shadow file ??? Didn't know that one.
 
  


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
User login without password Artik Debian 5 05-11-2005 12:56 PM
Samba -- XP user can log in to shares but smbclient user always gets password errors ejoe Linux - Software 3 04-18-2005 10:55 AM
add user prompt for password on login redir Linux - Newbie 2 02-28-2005 11:01 AM
No password user/automatic login to desktop lamiczka Linux - Software 2 11-17-2004 09:50 AM
Samba issue. Sometimes cannot login by using correct user/password. olegarr Linux - Networking 3 10-30-2003 09:17 PM

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

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