Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
su -p, su -m not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Alph
n00b
n00b


Joined: 21 Jun 2004
Posts: 49

PostPosted: Thu Apr 13, 2006 6:55 pm    Post subject: su -p, su -m not working Reply with quote

Well. It isn't working. :cry: What more can I say?
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Thu Apr 13, 2006 8:25 pm    Post subject: Reply with quote

Alph wrote:
Well. It isn't working. :cry: What more can I say?

You could say that you had read the man page.

You could say, for the benefit of those who do not know, what the -m and -p flags are expected to do (some versions of su allow you to clone the current working directory and envoronment variables if you set one of these options).

You could say that you had checked that the version of su you are using supports this feature in this way.

You could say what you are trying to do so that an interested party could suggest a different means to the same end.

You could say that you realize that no poster in the whole of these forums owes you so much as reading your question.

You could say that you value the time spent on responding to your post.

You could say that you value the response itself.

You could say that you have learned the danger of asking open ended questions.

You could say many things.
Back to top
View user's profile Send private message
Alph
n00b
n00b


Joined: 21 Jun 2004
Posts: 49

PostPosted: Thu Apr 13, 2006 11:37 pm    Post subject: Reply with quote

Thank you for deviating all your daily problems toward me, it's a real heartbreaker.

Haven't solved my problem, though. Thank you once again.

I'm using coreutils-5.94-r1, by the way, and I'd like to use this mean torwards my end. It really doesn't do anything, just su's into root.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Fri Apr 14, 2006 3:21 am    Post subject: Reply with quote

My humblest apologies for my most inadequate response to your most urgent and important of missives.

By your manner of address I had perceived you to be one of the highest social ranking, assuredly deserving of a complete and alacritive answer to your question as such I endeavoured to suggest what else you could say. I was unable to divine the great meaning of your most impressive query of the humble forums of which I am most honored to take but a small part.

If I may, great one, might I enquire as to whether you have verified that you are in fact using the su from coreutils-5.94? A humble suggestion, oh great and powerful one, if you could be troubled to, perhaps you could emerge gentoolkit and run "equery belongs `which su`" and, oh lord among lords, post in these humble forums the output thereof? I only ask this, oh most great one, because the version of su which I find in coreutils 5.94, forgive me this blasphemy against the word of one so great as you, does in fact support both -p and -m.

If I may ask of you one further favor, oh most ineffably great one, could you bestow upon this humble supplicant knowledge of the great purpose to which you strive?
Back to top
View user's profile Send private message
Raniz
l33t
l33t


Joined: 13 Sep 2003
Posts: 967
Location: Varberg, Sweden

PostPosted: Fri Apr 14, 2006 9:03 am    Post subject: Reply with quote

desultory wrote:
My humblest apologies for my most inadequate response to your most urgent and important of missives.

By your manner of address I had perceived you to be one of the highest social ranking, assuredly deserving of a complete and alacritive answer to your question as such I endeavoured to suggest what else you could say. I was unable to divine the great meaning of your most impressive query of the humble forums of which I am most honored to take but a small part.

If I may, great one, might I enquire as to whether you have verified that you are in fact using the su from coreutils-5.94? A humble suggestion, oh great and powerful one, if you could be troubled to, perhaps you could emerge gentoolkit and run "equery belongs `which su`" and, oh lord among lords, post in these humble forums the output thereof? I only ask this, oh most great one, because the version of su which I find in coreutils 5.94, forgive me this blasphemy against the word of one so great as you, does in fact support both -p and -m.

If I may ask of you one further favor, oh most ineffably great one, could you bestow upon this humble supplicant knowledge of the great purpose to which you strive?

You have too little to do.

Alph what does
Code:
$ export FOO='bar'
$ su --preserve-environment
[enter password]
# echo $FOO

output?
Back to top
View user's profile Send private message
Alph
n00b
n00b


Joined: 21 Jun 2004
Posts: 49

PostPosted: Fri Apr 14, 2006 12:00 pm    Post subject: Reply with quote

Well, with the --preserve-environment flag it outputs the bash usage page, like it's an unknown option:

Code:
alph@alph ~ $ export FOO='bar'
alph@alph ~ $ su --preserve-environment
Password:
/bin/bash: --preserve-environment: invalid option
Usage:  /bin/bash [GNU long option] [option] ...
        /bin/bash [GNU long option] [option] script-file ...
GNU long options:
        --debug
        --debugger
        --dump-po-strings
        --dump-strings
        --help
        --init-file
        --login
        --noediting
        --noprofile
        --norc
        --posix
        --protected
        --rcfile
        --restricted
        --verbose
        --version
        --wordexp
Shell options:
        -irsD or -c command or -O shopt_option          (invocation only)
        -abefhkmnptuvxBCHP or -o option
alph@alph ~ $

and also,
Code:
alph@alph # equery belongs $(which su)
[ Searching for file(s) /bin/su in *... ]
sys-apps/shadow-4.0.7-r4 (/bin/su)
alph@alph #

I'll try to unmerge shadow-4.0.7-r4 and see where it goes. Thanks.

EDIT:
Code:
!!! 'sys-apps/shadow' is part of your system profile.
!!! Unmerging it may be damaging to your system.

Ok no I won't. :lol:
Back to top
View user's profile Send private message
PMcCauley
Apprentice
Apprentice


Joined: 14 Mar 2006
Posts: 283
Location: Alberta, Canada

PostPosted: Sat Apr 15, 2006 5:50 am    Post subject: Reply with quote

Maybe you could reemerge shadow.
Code:
emerge =sys-apps/shadow-4.0.7-r4
or just emerge sys-apps/shadow but that will reemerge pam-login as well. I was able to get both the su -m and su -p to work but not the su --preserve-environment. I am using the same version of shadow as you.


Patrick
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Sat Apr 15, 2006 6:15 am    Post subject: Reply with quote

Raniz wrote:
You have too little to do.

I was trying to acquire pertinent data, it worked.

And to attempt to gather more pertinent data from Alph, could you provide a transcript of the results of:
Code:
export FOO="bar"
su -p
echo $FOO

Or perhaps:
Code:
export FOO="bar"
su -m
echo $FOO
Back to top
View user's profile Send private message
Alph
n00b
n00b


Joined: 21 Jun 2004
Posts: 49

PostPosted: Sat Apr 15, 2006 2:50 pm    Post subject: Reply with quote

Hey it works! I just upgraded to shadow-4.0.14-r1.

But now some funky errors appear whenever I su:
Code:
alph@alph ~ $ su
Password:
configuration error - unknown item 'FAILLOG_ENAB' (notify administrator)
configuration error - unknown item 'LASTLOG_ENAB' (notify administrator)
configuration error - unknown item 'MOTD_FILE' (notify administrator)
configuration error - unknown item 'FTMP_FILE' (notify administrator)
configuration error - unknown item 'ENV_ROOTPATH' (notify administrator)
configuration error - unknown item 'PASS_MIN_LEN' (notify administrator)
configuration error - unknown item 'CHFN_AUTH' (notify administrator)
alph /home/alph #
Back to top
View user's profile Send private message
Alph
n00b
n00b


Joined: 21 Jun 2004
Posts: 49

PostPosted: Sat Apr 15, 2006 3:28 pm    Post subject: Reply with quote

Solved it, I hadn't noticed the missing config files left to update, so I ran etc-update checked them all '-3' and it's working great now!

Thanks for all the help folks. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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