LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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, 04: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, 04:24 PM   #2
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 50
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, 06: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, 06:49 PM   #4
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 50
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, 06: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


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


All times are GMT -5. The time now is 02:40 PM.

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