Skip to content

Commit

Permalink
English version (#12)
Browse files Browse the repository at this point in the history
English version
  • Loading branch information
nadersip authored Dec 17, 2024
2 parents cde8a71 + 4e722c8 commit cc7933f
Show file tree
Hide file tree
Showing 7 changed files with 369 additions and 130 deletions.
42 changes: 42 additions & 0 deletions FileFolMgm.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,46 @@ def change_folderpermission():
print("")
print("Voici les nouvelles permissions sur le dossier")
folderPermission = os.system("ls -ld " + folderLocation + "/" + folderName)
print(folderPermission)

#English version

def file_permission_en():
fileName = input("Please enter the name of the file : ")
fileLocation = input("Please enter the file path : ")
filePermission = os.system("ls -l " + fileLocation + "/" + fileName)
print(filePermission)

def folder_permission_en():
folderName = input("Please enter the name of the folder : ")
folderLocation = input("Please enter the folder path : ")
folderPermission = os.system("ls -ld " + folderLocation + "/" + folderName)
print(folderPermission)

def change_filepermission_en():
fileName = input("Please enter the file name : ")
fileLocation = input("Please enter the file path : ")
print("Here are the file permissions : ")
filePermission = os.system("ls -l " + fileLocation + "/" + fileName)
print(filePermission)
print("")
nPermission = input("Please enter the new permissions : ")
aPermission = os.system("chmod " + nPermission + " " + fileLocation + "/" + fileName)
print("")
print("Here are the new permissions on the file : ")
filePermission = os.system("ls -l " + fileLocation + "/" + fileName)
print(filePermission)

def change_folderpermission_en():
folderName = input("Please enter the folder name : ")
folderLocation = input("Please enter the folder path : ")
print("Here are the folder permissions : ")
folderPermission = os.system("ls -ld " + folderLocation + "/" + folderName)
print(folderPermission)
print("")
nPermission = input("Please enter the new permissions : ")
aPermission = os.system("chmod " + nPermission + " " + folderLocation + "/" + folderName)
print("")
print("Here are the new permissions on the folder : ")
folderPermission = os.system("ls -ld " + folderLocation + "/" + folderName)
print(folderPermission)
26 changes: 25 additions & 1 deletion GestionService.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,28 @@ def service_restart():
nameService = input("Veuillez entrer le nom du service que vous voulez redémarrer : ")
serviceRestart = os.system("systemctl restart " + nameService)
serviceStatus = os.system("systemctl status " + nameService)
print(serviceStatus)
print(serviceStatus)

#English version

def service_status_en():
nameService = input("Please enter the name of the service whose status you want to check : ")
serviceStatus = os.system("systemctl status " + nameService)
print(serviceStatus)

def service_start_en():
nameService = input("Please enter the name of the service you want to start : ")
serviceStart = os.system("systemctl start " + nameService)
serviceStatus = os.system("systemctl status " + nameService)
print(serviceStatus)

def service_stop_en():
nameService = input("Please enter the name of the service you want to stop : ")
serviceStop = os.system("systemctl stop " + nameService)
serviceStatus = os.system("systemctl status " + nameService)
print(serviceStatus)

def service_restart_en():
nameService = input("Please enter the name of the service you want to restart : ")
serviceRestart = os.system("systemctl restart " + nameService)
serviceStatus = os.system("systemctl status " + nameService)
13 changes: 13 additions & 0 deletions PasswordMgm.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,16 @@ def unblock_access():
user = input("Veuillez saisir le nom de l'utilisateur pour débloquer l'accès : ")
blAccess = os.system("passwd -u " + user)

#English version

def password_change_en():
user = input("Please enter the name of the user to change the password : ")
chPassword = os.system("passwd " + user)

def block_access_en():
user = input("Please enter the name of the user to block access : ")
blAccess = os.system("passwd -l " + user)

def unblock_access_en():
user = input("Please enter the name of the user to unblock access : ")
blAccess = os.system("passwd -u " + user)
11 changes: 11 additions & 0 deletions ProcessusMgm.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,14 @@ def affiche_processus():
def stop_processus():
ps = input("Veuillez entrer le numéro du processus à terminer : ")
stop = os.system("kill -9 " + ps)

#English version

def affiche_processus_en():
print("Here are the ongoing processes : ")
processus = os.system("ps")
print(processus)

def stop_processus_en():
ps = input("Please enter the process ID to terminate : ")
stop = os.system("kill -9 " + ps)
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ C'est un projet en cours de développement, qui sera soutenu par le professeur e

Si vous souhaitez faire des recommandations, n'hésitez pas à créer un ticket afin que nous puissions évaluer votre demande et vous aider.

La version v1.0.0 est prête
La version v1.1.0 est prête

Merci.
Merci.

This project is developed by Professor Mhd Nader Sipahy from La Cité Collégiale for the Linux Server course.

This project contains Python scripts to manage users, groups, files, folders, and processes.

It is an ongoing development project that will be supported by the professor and students of La Cité Collégiale.

If you wish to make recommendations, feel free to create a ticket so that we can assess your request and assist you.

Version v1.1.0 is ready.
29 changes: 29 additions & 0 deletions UsersGroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,33 @@ def delete_user():
print(os.system("cat /etc/passwd | grep -i " + user))


#English version


def get_user_en():
users = os.system("cat /etc/group")
print(users)

def get_groups_en():
groups = os.system("cat /etc/group")
print(groups)

def creat_group_en():
grp = input("Please enter the name of the group to create : ")
creatGrp = os.system("groupadd " + grp)
print(os.system("cat /etc/group | grep -i " + grp))

def delete_group_en():
grp = input("Please enter the name of the group to delete : ")
creatGrp = os.system("groupdel " + grp)
print(os.system("cat /etc/group | grep -i " + grp))

def creat_user_en():
user = input("Please enter the name of the user to create : ")
creatGrp = os.system("adduser " + user)
print(os.system("cat /etc/passwd | grep -i " + user))

def delete_user_en():
user = input("Please enter the name of the user to delete : ")
creatGrp = os.system("userdel " + user)
print(os.system("cat /etc/passwd | grep -i " + user))
Loading

0 comments on commit cc7933f

Please sign in to comment.