Use default user
This commit is contained in:
parent
cede18459f
commit
6461fa835f
6 changed files with 289 additions and 10 deletions
|
|
@ -45,3 +45,9 @@ for mount in mounts:
|
|||
os.makedirs(directory)
|
||||
if not os.path.ismount(directory):
|
||||
subprocess.run(["/usr/bin/mount", "-t", "cifs", mount['RemotePath'], directory ,"-o", f"sec=krb5i,username={user},cruid=1000,uid=1000,gid=1000"], check=True)
|
||||
|
||||
for printer in data["Printers"]:
|
||||
try:
|
||||
subprocess.run(["/usr/sbin/lpadmin", "-p", printer['Name'], "-E", "-v", printer['IppURL'], "-m", "driverless:"+printer['IppURL']], check=True)
|
||||
except subprocess.CalledProcessError:
|
||||
print(f"Error adding printer {{printer['Name']}}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue