I want to add or delete or edit usernames of /etc/passwd
in a C program. Are there any standard Linux functions that do a such functions?
相关问题
- Multiple sockets for clients to connect to
- Is shmid returned by shmget() unique across proces
- What is the best way to do a search in a large fil
- glDrawElements only draws half a quad
- how to get running process information in java?
There is
adduser
anddeluser
. Useman deluser
for details.EDIT: i missed the C part in the question.
man
is also your friend in this case. Withman 3 deluser
you can ask if there is anything in stdlib called like that. Read https://unix.stackexchange.com/questions/3586/what-do-the-numbers-in-a-man-page-mean for more informations on that.This is not the case. You might want to call the unix tool from within C: How do you write a C program to execute another program?