View previous topic :: View next topic |
Author |
Message |
Hypnos Advocate
Joined: 18 Jul 2002 Posts: 2889 Location: Omnipresent
|
Posted: Wed Aug 07, 2002 6:51 am Post subject: Manually updating tokens |
|
|
Say root adds me to a group while I'm logged in using "usermod"; I find that I have to log out and log back in to actually become a member of this group (according to "groups"). Is there a way for either root or I to manually update the auth tokens? Or should root be using a different command to add users to groups? |
|
Back to top |
|
|
puddpunk l33t
Joined: 20 Jul 2002 Posts: 681 Location: New Zealand
|
Posted: Wed Aug 07, 2002 7:01 am Post subject: . |
|
|
Try env-update.
That rehashes your profile files, and the rest. perhaps that will help. Otherwise check out the man/info pages for usermod and see if anything jumps out at you. |
|
Back to top |
|
|
Hypnos Advocate
Joined: 18 Jul 2002 Posts: 2889 Location: Omnipresent
|
Posted: Thu Aug 08, 2002 5:55 pm Post subject: |
|
|
Eh, no dice ... this is an annoyance since changes seem to propagate on other Linux systems. I'm not sure what's different ... |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Thu Aug 08, 2002 6:37 pm Post subject: Re: Manually updating tokens |
|
|
Hypnos wrote: | Is there a way for either root or I to manually update the auth tokens? |
No, not that I'm aware of.
Hypnos wrote: | Eh, no dice ... this is an annoyance since changes seem to propagate on other Linux systems. I'm not sure what's different ... |
Hrmmm...pretty sure the log out/log back in is a common requirement across all linux systems. Maybe its different for specific PAM modules or other network auth systems, but I don't believe it's possible when dealing with the local linux host.
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
Hypnos Advocate
Joined: 18 Jul 2002 Posts: 2889 Location: Omnipresent
|
Posted: Thu Aug 08, 2002 6:51 pm Post subject: |
|
|
I might try useradd instead of usermod. Looking at usermod's homepage, it has a bunch of caveats, from which one can infer that things are not updated on the fly. |
|
Back to top |
|
|
jean-michel Tux's lil' helper
Joined: 30 May 2002 Posts: 142 Location: Somewhere East of the Atlantic
|
Posted: Thu Aug 08, 2002 7:10 pm Post subject: |
|
|
Quote: |
Hrmmm...pretty sure the log out/log back in is a common requirement across all linux systems. Maybe its different for specific PAM modules or other network auth systems, but I don't believe it's possible when dealing with the local linux host.
|
You are correct. It has been a requirement on every GNU/Linux distribution I have used, which includes Mandrake, Red Hat, Debian, Suse, Corel, Slackware, Caldera, Source Mage, and Gentoo.
Actually, it is also true on Solaris and SunOS, so I would not be surprised if that requirement were not a common attribute of most, perhaps all, UNICES.
In any event, changes to /etc/group happen rarely enough that the requirement of logging out and logging back in, while mildly annoying, is hardly a major inconvenience. _________________ The Struggle for the Future of Human Evolution Begins: Autonomy the SciFi Series! |
|
Back to top |
|
|
mksoft l33t
Joined: 28 May 2002 Posts: 844
|
Posted: Thu Aug 08, 2002 10:33 pm Post subject: |
|
|
AFAIK you can use newgrp command after the group has been assigned to you with no need to logout/login. This is part from man newgrp:
Quote: | NAME
newgrp - Change group ID
sg - Execute command as different group ID
SYNOPSIS
newgrp [-] [group]
newgrp [-] [group [[-c] command]]
DESCRIPTION
newgrp is used to change the current group ID during a
login session. If the optional - flag is given, the
user's environment will be reinitialized as though the
user had logged in, otherwise the current environment,
including current working directory, remains unchanged.
newgrp changes the current real group ID to the named
group, or to the default group listed in /etc/passwd if no
group name is given. The user will be prompted for a pass-
word if they do not have a password and the group does, or
if the user is not listed as a member and the group has a
password. The user will be denied access if the group
password is empty and the user is not listed as a member.
|
_________________ There's someone in my head but it's not me - Pink Floyd
Last edited by mksoft on Thu Aug 08, 2002 11:25 pm; edited 1 time in total |
|
Back to top |
|
|
Hypnos Advocate
Joined: 18 Jul 2002 Posts: 2889 Location: Omnipresent
|
Posted: Thu Aug 08, 2002 11:06 pm Post subject: |
|
|
mksoft wrote: | AFAIK you can use newgrp command after the group has been assigned to you with no need to logout/login. |
"Guru" indeed -- thanks! |
|
Back to top |
|
|
mksoft l33t
Joined: 28 May 2002 Posts: 844
|
Posted: Thu Aug 08, 2002 11:27 pm Post subject: |
|
|
Hypnos wrote: | mksoft wrote: | AFAIK you can use newgrp command after the group has been assigned to you with no need to logout/login. |
"Guru" indeed -- thanks! |
Sure dude , this one troubled me as well, until I saw something about it somewhere on the web (can't remember where though), it was like finding a treasure.
EDIT: Looks like I'm not a GURU anymore _________________ There's someone in my head but it's not me - Pink Floyd |
|
Back to top |
|
|
Oo.et.oO Apprentice
Joined: 23 Apr 2002 Posts: 291 Location: burlington
|
Posted: Fri Nov 01, 2002 4:44 pm Post subject: newgrp needs a password |
|
|
mksoft wrote: | AFAIK you can use newgrp command after the group has been assigned to you with no need to logout/login. |
so on my system newgrp - asks for a password.
i believe it wants the group password but all mine are empty of course. none of my passwords, root or mine, or empty password work.
i just get a "sorry"
which the manpage says means that i'm not listed in that group. but i'm using the "-" option.
could this be a pam issue? i tried adding both a newgroup file (which should work) and a util-linux file to the pam.d directory, but it still doesn't work.
i guess this doesn't bother me so much, but anyone have any ideas to satisfy my curiosity? |
|
Back to top |
|
|
mksoft l33t
Joined: 28 May 2002 Posts: 844
|
Posted: Fri Nov 01, 2002 6:10 pm Post subject: |
|
|
You should assing the user to the group (as root) before running newgrp as the user.
newgrp saves you from the need to relogin. _________________ There's someone in my head but it's not me - Pink Floyd |
|
Back to top |
|
|
Oo.et.oO Apprentice
Joined: 23 Apr 2002 Posts: 291 Location: burlington
|
Posted: Fri Nov 01, 2002 7:50 pm Post subject: |
|
|
mksoft wrote: | You should assing the user to the group (as root) before running newgrp as the user.
newgrp saves you from the need to relogin. |
i did. but it wouldn't matter anyway as newgrp - just does:
"the user's environment will be reinitialized as though the user had logged in"
(from the manpage)
anyway, i added myself to the cron group, did newgrp - and it asked for a password. no passwords that i know of succeeded. |
|
Back to top |
|
|
|