LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack Search this Thread
Old 02-14-2011, 12:49 PM   #1
bartonski
Member
 
Registered: Jul 2006
Location: Louisville, KY
Distribution: Fedora 12, Slackware, Debian, Ubuntu Karmic, FreeBSD 7.1
Posts: 443
Blog Entries: 1

Rep: Reputation: 47
Trouble connecting to sshd on Ubuntu 9.10. Logs point to SELinux problem...


I'm trying to ssh into my Ubuntu box, but the connection is getting denied. When I look at /var/log/auth.log, I see the following:

Code:
Feb 14 12:41:16 tiger-laptop sshd[6798]: error: ssh_selinux_getctxbyname: Failed to get default SELinux security context for tiger
I googled for this, and ran across the following:

http://www.spinics.net/lists/fedora-.../msg13049.html

Here's the part that I think relates to the problem that I'm having:

Quote:
>> >> What's wrong on my system?
>> >> Why it's not possible to login even if selinux is in permissive mode?
>> >> Any suggestions?
>> >
>> > I'd start by trying to figure out why sshd isn't running in sshd_t (it
>> > seems to be running in sysadm_t).
>> >
>> > Paul.
>> > --
>> > selinux mailing list
>> > selinux@xxxxxxxxxxxxxxxxxxxxxxx
>> > https://admin.fedoraproject.org/mail...stinfo/selinux
>> >
>>
>> Yes, sshd is running in sysadm_t:
>>
>> # ps axZ | grep sshd
>> system_u:system_r:sysadm_t 3632 ? Ss 0:00
>> /usr/sbin/sshd
>> -o PidFile=/var/run/sshd.init.pi
>>
>> # ls -Z /usr/sbin/sshd
>> system_ubject_r:sshd_exec_t /usr/sbin/sshd
>>
>> Don't know why it's not sshd_t. I didn't modified something. It's a
>> standard installation of sles11 with the default reference policy from
>> tresys.
>>
>> Maybe this code snippet from policy/modules/services/ssh.te is
>> responsible
>> for that:
>> ## <desc>
>> ## <p>
>> ## Allow ssh logins as sysadm_r:sysadm_t
>> ## </p>
>> ## </desc>
>> gen_tunable(ssh_sysadm_login, true)
>>
>> Any ideas?
>
> Do you have boolean init_upstart set to on? if not try setting it to on.
> I do not believe ssh_sysadm_login boolean works currently but i may be
> mistaken.
>>
>> --
Yeah, setting init_upstart to on did the trick! THANK A LOT!
Do you know why this prevents the user from logging in through ssh even if
selinux is set to permissive??
Ok, so the million dollar question is 'where do I set 'init_upstart=1'

It's not clear from context which configuration file needs to be edited, and I'm not at all familiar with SELinux configuration.
 
Old 02-14-2011, 04:22 PM   #2
corp769
Guru
 
Registered: Apr 2005
Posts: 5,798

Rep: Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978
You would just need to run the following:

Code:
setsebool -P init_upstart=1
 
Old 02-14-2011, 09:57 PM   #3
bartonski
Member
 
Registered: Jul 2006
Location: Louisville, KY
Distribution: Fedora 12, Slackware, Debian, Ubuntu Karmic, FreeBSD 7.1
Posts: 443
Blog Entries: 1

Original Poster
Rep: Reputation: 47
worked like a charm...

Thanks.
 
Old 02-15-2011, 12:21 AM   #4
corp769
Guru
 
Registered: Apr 2005
Posts: 5,798

Rep: Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978
No problem!
 
  


Reply

Tags
ssh selinux


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble connecting Linksys WUSB11 v.2.6 to Ubuntu RRNHN Linux - Networking 1 07-30-2010 11:00 PM
trouble with connecting to static ip access point squidddy Linux - Networking 1 02-03-2010 07:01 AM
[Ubuntu] Having trouble connecting to the internet UbuntuIdiot Linux - Newbie 8 06-13-2009 11:44 PM
Problem connecting to access point in Suse 10.0 Flashpass Linux - Networking 3 03-01-2007 01:23 AM
Problem connecting to access point wes_jin Linux - Newbie 1 06-16-2006 07:04 PM


All times are GMT -5. The time now is 07:05 AM.

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