revert: create maildir again
This commit is contained in:
parent
6196c64ce2
commit
ec0f777199
@ -27,6 +27,8 @@ public class UnixUserProcessorFactory implements EntityProcessorFactory {
|
|||||||
+ user.getUserId() + ":" + user.getPac().getName()
|
+ user.getUserId() + ":" + user.getPac().getName()
|
||||||
+ ":" + user.getComment() + ":" + user.getHomedir()
|
+ ":" + user.getComment() + ":" + user.getHomedir()
|
||||||
+ ":" + user.getShell() + "\n"));
|
+ ":" + user.getShell() + "\n"));
|
||||||
|
appendSetHomeACLProcessor(aCP, user);
|
||||||
|
appendMakeMaildirProcessor(aCP, user);
|
||||||
aCP.appendProcessor(new ShellProcessor("salt-call state.sls pacs >/dev/null 2>&1"));
|
aCP.appendProcessor(new ShellProcessor("salt-call state.sls pacs >/dev/null 2>&1"));
|
||||||
return aCP;
|
return aCP;
|
||||||
}
|
}
|
||||||
@ -74,4 +76,17 @@ public class UnixUserProcessorFactory implements EntityProcessorFactory {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void appendSetHomeACLProcessor(CompoundProcessor aCP, UnixUser user) {
|
||||||
|
aCP.appendProcessor(new ShellProcessor("chmod 700 " + user.getHomedir()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void appendMakeMaildirProcessor(CompoundProcessor aCP, UnixUser user) {
|
||||||
|
aCP.appendProcessor(
|
||||||
|
new ShellProcessor(
|
||||||
|
"su -l " + user.getName() + " -s \"/bin/bash\" -c \"maildirmake " +
|
||||||
|
user.getHomedir() + "/Maildir" +
|
||||||
|
"\""
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user