FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 07-19-2011, 12:40 PM
Daniel J Walsh
 
Default adding users with different home directory ( /1home instead of /home)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/19/2011 07:57 AM, Jatin K wrote:
> Dear all
>
> I'm RHEL 6 , trying to add a user with following command
>
> useradd -d /1home user1 passwd user1
>
>
> if I try ssh user1@localhost , following error displayed on the
> screen
>
> Could not chdir to home directory /1home/user1: Permission denied ,
> but user still able to login and prompts displayed [user1@testsrv
> /]$ instead of [user1@testsrv ~]$ ( user not getting its home
> directory.) -------------following is the reference related to home
> directory permission and security--------------- directory
> permission
>
> ls -ld /1home
>
> drwxr-xr-x. 4 root root 4096 Jul 19 10:43 /1home
>
> ------------------------------------- SELinux Context
>
> ls -ldZ /1home
>
> drwxr-xr-x. root root system_ubject_r:home_root_t:s0 /1home/
>
> ---------------------------------------------
>
> what could be the problem ???
>

You have an SELinux labeling problem

Simplest solution.

# semanage fcontext -a -e /home /1home
# restorecon -R -v /1home


Should fix your problem.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4le0cACgkQrlYvE4MpobNONgCgythAyU5Lt2 uyAZivvW1Ksveo
FRIAoNiiDK/vg/CrYd1kNH0afYTpsIAN
=UkfR
-----END PGP SIGNATURE-----
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 07-20-2011, 05:11 AM
Jatin K
 
Default adding users with different home directory ( /1home instead of /home)

On Tuesday 19 July 2011 06:10 PM, Daniel J Walsh wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 07/19/2011 07:57 AM, Jatin K wrote:
>> Dear all
>>
>> I'm RHEL 6 , trying to add a user with following command
>>
>> useradd -d /1home user1 passwd user1
>>
>>
>> if I try ssh user1@localhost , following error displayed on the
>> screen
>>
>> Could not chdir to home directory /1home/user1: Permission denied ,
>> but user still able to login and prompts displayed [user1@testsrv
>> /]$ instead of [user1@testsrv ~]$ ( user not getting its home
>> directory.) -------------following is the reference related to home
>> directory permission and security--------------- directory
>> permission
>>
>> ls -ld /1home
>>
>> drwxr-xr-x. 4 root root 4096 Jul 19 10:43 /1home
>>
>> ------------------------------------- SELinux Context
>>
>> ls -ldZ /1home
>>
>> drwxr-xr-x. root root system_ubject_r:home_root_t:s0 /1home/
>>
>> ---------------------------------------------
>>
>> what could be the problem ???
>>
> You have an SELinux labeling problem

Thank you very very much .....

I run following and the problem is solved

chcon --reference /home /1home/*

> Simplest solution.
>
> # semanage fcontext -a -e /home /1home
> # restorecon -R -v /1home
>
sorry I have not tried your said command as SELinux management tool is
not installed I think, it says semange command not found
but can you spotlight on difference between your said command and which
I run




Warm Regards
--

v
/(_)
^ ^ Jatin Khatri
Registerd Linux user No #501175
www.counter.li.org
No M$

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 07-20-2011, 05:11 AM
Jatin K
 
Default adding users with different home directory ( /1home instead of /home)

On Tuesday 19 July 2011 06:10 PM, Daniel J Walsh wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 07/19/2011 07:57 AM, Jatin K wrote:
>> Dear all
>>
>> I'm RHEL 6 , trying to add a user with following command
>>
>> useradd -d /1home user1 passwd user1
>>
>>
>> if I try ssh user1@localhost , following error displayed on the
>> screen
>>
>> Could not chdir to home directory /1home/user1: Permission denied ,
>> but user still able to login and prompts displayed [user1@testsrv
>> /]$ instead of [user1@testsrv ~]$ ( user not getting its home
>> directory.) -------------following is the reference related to home
>> directory permission and security--------------- directory
>> permission
>>
>> ls -ld /1home
>>
>> drwxr-xr-x. 4 root root 4096 Jul 19 10:43 /1home
>>
>> ------------------------------------- SELinux Context
>>
>> ls -ldZ /1home
>>
>> drwxr-xr-x. root root system_ubject_r:home_root_t:s0 /1home/
>>
>> ---------------------------------------------
>>
>> what could be the problem ???
>>
> You have an SELinux labeling problem

Thank you very very much .....

I run following and the problem is solved

chcon --reference /home /1home/*

> Simplest solution.
>
> # semanage fcontext -a -e /home /1home
> # restorecon -R -v /1home
>
sorry I have not tried your said command as SELinux management tool is
not installed I think, it says semange command not found
but can you spotlight on difference between your said command and which
I run




Warm Regards
--

v
/(_)
^ ^ Jatin Khatri
Registerd Linux user No #501175
www.counter.li.org
No M$

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 07-20-2011, 01:00 PM
Daniel J Walsh
 
Default adding users with different home directory ( /1home instead of /home)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/20/2011 01:11 AM, Jatin K wrote:
> On Tuesday 19 July 2011 06:10 PM, Daniel J Walsh wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>
>> On 07/19/2011 07:57 AM, Jatin K wrote:
>>> Dear all
>>>
>>> I'm RHEL 6 , trying to add a user with following command
>>>
>>> useradd -d /1home user1 passwd user1
>>>
>>>
>>> if I try ssh user1@localhost , following error displayed on the
>>> screen
>>>
>>> Could not chdir to home directory /1home/user1: Permission denied
>>> , but user still able to login and prompts displayed
>>> [user1@testsrv /]$ instead of [user1@testsrv ~]$ ( user not
>>> getting its home directory.) -------------following is the
>>> reference related to home directory permission and
>>> security--------------- directory permission
>>>
>>> ls -ld /1home
>>>
>>> drwxr-xr-x. 4 root root 4096 Jul 19 10:43 /1home
>>>
>>> ------------------------------------- SELinux Context
>>>
>>> ls -ldZ /1home
>>>
>>> drwxr-xr-x. root root system_ubject_r:home_root_t:s0 /1home/
>>>
>>> ---------------------------------------------
>>>
>>> what could be the problem ???
>>>
>> You have an SELinux labeling problem
>
> Thank you very very much .....
>
> I run following and the problem is solved
>
> chcon --reference /home /1home/*
>
>> Simplest solution.
>>
>> # semanage fcontext -a -e /home /1home # restorecon -R -v /1home
>>
> sorry I have not tried your said command as SELinux management tool
> is not installed I think, it says semange command not found but can
> you spotlight on difference between your said command and which I
> run
>
>
>
>
> Warm Regards

semanage not semange

# which semanage
/usr/sbin/semanage

In your case you just labeled eveything in /1home as home_root_t, which
is wrong. Also if the system gets relabeled, your labelling will be lost.


Mine says to set the system defaults to label everything under /1home as
if it was under /home


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4m0YAACgkQrlYvE4MpobODTACdEAMxkyHv9T PYdePeNd1fXbYm
TkYAoIx0KwZWjMfwNfn3qSnxECpFJukB
=YAom
-----END PGP SIGNATURE-----
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 01:34 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org