[SSSD] [PATCH] Make sss_userdel check for logged in users

David O'Brien davido at redhat.com
Wed Apr 28 03:14:08 UTC 2010


Jakub Hrozek wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 04/06/2010 04:34 PM, Stephen Gallagher wrote:
>> Sorry, I hate to say this, but I realized that killall returns nonzero
>> if there are no processes running by that user name. So this warning is
>> going to look wrong if we run the userdel command on a system where the
>> user isn't logged in. I withdraw my request for this warning.
>>
>> Also, we probably need to do 'killall -9' rather than simply killall, as
>> SIGTERM doesn't terminate shell processes (which are the most important
>> ones to kill if we need to kick a user)
> 
> Ah, correct. I only tested with ssh session where the kick worked fine.
> 
> Thank you for the review, a new patch is attached.
> 

I'm not much for reading patches, and while I've got the gist of this, I 
have a couple of questions:
1. What's ENOSYS?
2. From the man page:
"-f,--force
This option forces sss_userdel to remove the userĀ“s home directory and 
mail spool, even if they are not owned by the specified user."
  Who else would they be owned by, and how would that come about, and why?
3. "Kill users' processes before removing him"  s/users'/user's/  :-)
4. So far I've been able to use sss_userdel -k on a logged in user and 
not see the expected warning message about the user being logged in. 
This is with multiple processes running or just logging in in a shell.

Any further updates or examples the doc needs to be aware of for other 
clients, e.g., Solaris, Windows, Mac?

thanks

-- 

David O'Brien
Red Hat Asia Pacific Pty Ltd

He who asks is a fool for five minutes, but he who does not ask remains 
a fool forever."
  ~ Chinese proverb



More information about the sssd-devel mailing list