Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Su woes in a gentoo chroot on asus tf700 [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
dwardo
n00b
n00b


Joined: 10 Nov 2004
Posts: 55
Location: France

PostPosted: Sat Mar 16, 2013 9:38 am    Post subject: Su woes in a gentoo chroot on asus tf700 [SOLVED] Reply with quote

Hello,

I've sucessfully installed gentoo in a chroot on my asus tf700 (Infinity) and my only woe is that the su command does not work for my "normal" user.

I get a :
setgit: operation not permitted error

I've been googling for a while (>1 week) and have checked that:
* normal user is in wheel group
* permission of /bin/su are correct "-rws--x--x"
* permission of /bin/sh are correct
* modified /etc/securetty to add the pts/[0-9] as those are the tty in android terminal emulator
* ... (read the specific su issues threads on the forums)

I actually see no other chroot on android instructions where people use su (so I guess they stay as root in the chroot...)

I finally went for a strace -o strace.lo su

And when analysing the strace.log file found the first error to be and EACCES when trying to open socket to file /dev/log
Followed by the EPERM error when running setgid32(0)

Turns out on the tf700 /dev/log is not a socket file... but a directory containning 4 things:
crw-rw-rw- 1 root log 10, 28 11 mars 22/13 system
crw-rw-rw- 1 root log 10, 29 11 mars 22/13 radio
crw-rw-rw- 1 root log 10, 31 11 mars 22/13 main
crw-rw-rw- 1 root log 10, 30 11 mars 22/13 events

Could this be the reason the setgid32(0) fails because the preceding acces to /dev/log failed ?

Thanks for any feedback and possible solutions

Regards


Last edited by dwardo on Sun Mar 17, 2013 8:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Sat Mar 16, 2013 11:11 am    Post subject: Reply with quote

Quote:
I actually see no other chroot on android instructions where people use su (so I guess they stay as root in the chroot...)


Maybe because it's not need :
root: login user
user: exit
root:

why would you want user to use su then ?

For your problem, i would dig /etc/login.defs where you could tweak log file...
But as i said, i'm not sure if anyone has a need for su in a chroot.
Back to top
View user's profile Send private message
dwardo
n00b
n00b


Joined: 10 Nov 2004
Posts: 55
Location: France

PostPosted: Sat Mar 16, 2013 5:42 pm    Post subject: Reply with quote

krinn wrote:
Quote:
I actually see no other chroot on android instructions where people use su (so I guess they stay as root in the chroot...)


Maybe because it's not need :
root: login user
user: exit
root:

why would you want user to use su then ?

For your problem, i would dig /etc/login.defs where you could tweak log file...
But as i said, i'm not sure if anyone has a need for su in a chroot.


Well I setup the entire environment and login as my user by default... so when I want to go to root I want to su...

I've also installed a ubuntu chroot using a dedicated app and there su works... Which suggests it is specific to gentoo install...

The more I read the sticky threads the more I don't understand as everything seems correctly set up
Back to top
View user's profile Send private message
dwardo
n00b
n00b


Joined: 10 Nov 2004
Posts: 55
Location: France

PostPosted: Sun Mar 17, 2013 8:19 pm    Post subject: Reply with quote

Solved...

Well I re-read the stickies and sure enough the answer was in them....
I had missed the "NO nosuid option" for the partition on which su is... :-(

Once that was corrected, all is good !
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum