cozy / cozy-debian

Cozy Debian package
13 stars 4 forks source link

Delete cozy-* users when purging #35

Closed clochix closed 7 years ago

clochix commented 8 years ago

We should find a way to delete every users created by Cozy.

babolivier commented 8 years ago

We can use this as a base:

# cat /etc/passwd | cut -d":" -f1 | grep cozy

This lists all users beginning with "cozy".

I tried it on my personnal server (after creating fake "cozy-" accounts), but didn't seem to be able to pipe userdel to this command line.

Alternatively, a for loop in a bash script should do the trick.

nono commented 8 years ago

Maybe with xargs:

cat /etc/passwd | cut -d":" -f1 | grep cozy | xargs -L1 userdel
clochix commented 8 years ago

@nono we should use a moar specific regex, like ^cozy\-.

nono commented 8 years ago

@clochix yes, my comment was just an answer to @babolivier to show xargs