LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 11-26-2008, 02:51 AM   #1
abhishekrahel
LQ Newbie
 
Registered: Aug 2007
Posts: 20

Rep: Reputation: 0
Passwordless System User


Hi to everyone

Could anyone guide me how to make a system user password less in Linux?


Thanks in advance.
 
Old 11-26-2008, 03:24 AM   #2
ram_rajavarapu
Member
 
Registered: May 2008
Posts: 44

Rep: Reputation: 15
use the command
# passwd -d username
then you are able to login without password.
 
Old 11-26-2008, 11:51 PM   #3
hasanatizaz
Member
 
Registered: Nov 2007
Location: Pakistan
Distribution: Redhat and Debian
Posts: 317
Blog Entries: 1

Rep: Reputation: 35
go to /etc/shadow
and remove the md5 algorithm
make sure colens ( : ) are intact | do not remove them.
 
Old 11-27-2008, 02:28 AM   #4
abhishekrahel
LQ Newbie
 
Registered: Aug 2007
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by abhishekrahel View Post
Hi to everyone

Could anyone guide me how to make a system user password less in Linux?


Thanks in advance.

Hi

Thanks for the response.

I have tried both options got, when i tried "passwd-d username",
it will simply delete the encrypted password information form /etc/shadow.

[root@pas-3 ~]# useradd aisa
[root@pas-3 ~]# passwd -d aisa
Removing password for user aisa.
passwd: Success


[root@pas-3 ~]# grep aisa /etc/passwd
aisa:x:55019:55019::/home/aisa:/bin/bash
[root@pas-3 ~]# grep aisa /etc/shadow
aisa::14210:0:99999:7:::

But when i tried to login nothing worked:
login as: aisa
aisa@146.223.126.36's password:
Access denied
aisa@146.223.126.36's password:



Any suggestion.
Thanks.
 
Old 11-27-2008, 03:31 AM   #5
hasanatizaz
Member
 
Registered: Nov 2007
Location: Pakistan
Distribution: Redhat and Debian
Posts: 317
Blog Entries: 1

Rep: Reputation: 35
check if chattr is on
delete the user create it again and then
go to etc/shadow
remove the md5 algor.... and it will work as passwdless authen....

Last edited by hasanatizaz; 11-27-2008 at 03:50 AM.
 
Old 11-27-2008, 03:55 AM   #6
tajamari
Member
 
Registered: Jul 2007
Distribution: Red Hat CentOS Ubuntu FreeBSD OpenSuSe
Posts: 252

Rep: Reputation: 32
Quote:
Originally Posted by abhishekrahel View Post
Hi to everyone

Could anyone guide me how to make a system user password less in Linux?


Thanks in advance.
Why do you need to have a user without password? It will most likely be a medium for your system to be hacked.
 
Old 11-27-2008, 03:59 AM   #7
hasanatizaz
Member
 
Registered: Nov 2007
Location: Pakistan
Distribution: Redhat and Debian
Posts: 317
Blog Entries: 1

Rep: Reputation: 35
btw which distro you are using, i tried the following on ubuntu its still giving me as auth failure but in rhel5 its working with no issues.
 
Old 11-27-2008, 04:07 AM   #8
tajamari
Member
 
Registered: Jul 2007
Distribution: Red Hat CentOS Ubuntu FreeBSD OpenSuSe
Posts: 252

Rep: Reputation: 32
Follow this procedure is you want a passwordless ssh/scp from a remote host.

1. local> ssh-keygen -t dsa -b 2048 -f .ssh/id_dsa
2. local> cd .ssh
3. local> scp id_dsa.pub user@remote:~/.ssh/id_dsa.pub
4. local> ssh user@remote
5. remote> cd .ssh
6. remote> cat id_dsa.pub >> authorized_keys2
7. remote> chmod 640 authorized_keys2
8. remote> rm id_dsa.pub
 
  


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
Can't add local system user - useradd keeps saying user already exists ADeluiz Linux - Security 5 07-26-2013 03:17 PM
Can't use passwordless ssh sunhui Linux - Security 1 10-03-2006 08:29 PM
Passwordless user in Ubuntu 6.06 yitzhakbg Linux - Security 1 09-05-2006 12:12 PM
C program to see user log on in system and print user with real user name also naveen245 Programming 2 12-21-2005 12:53 AM
Regarding Passwordless SSH nedian123 Linux - Software 1 08-05-2004 05:07 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

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