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

David O'Brien davido at redhat.com
Thu Apr 29 00:24:08 UTC 2010


Jakub Hrozek wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 04/28/2010 05:14 AM, David O'Brien wrote:
>> 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?
> 
> In this context, it means not implemented.
> 
>> 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?
> 
> A different UID. For example, consider this sequence:
> 
> 1) sss_useradd foo (homedir and spool are created)
> 2) sss_userdel --no-remove foo (--no-remove can also be a system-wide
> default)
> 3) sss_useradd foo (homedir and spool are not created, just a warning is
> printed that they already exist)
> 4) sss_userdel --force foo (homedir and spool are removed even though
> they belong to a different user)
> 
>> 3. "Kill users' processes before removing him"  s/users'/user's/  :-)
> 
> Yup, manpage bug. Thanks for catching it.
> 
>> 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.
>>
> 
> The warning message is printed when deleting a user who is logged in
> /without/ the -k flag. The -k flag just kicks the user out of the
> system, by terminating all processes run by him - including his login shell.
> 
>> Any further updates or examples the doc needs to be aware of for other 
>> clients, e.g., Solaris, Windows, Mac?
>>
> 
> So far we don't port SSSD to these platforms, but when we do, just a
> note that this flag is not supported outside Linux yet.

ok, all that makes sense. I misread how the -k flag works.

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