Any race conditions involved on adding/mod users from differentprocesses - Security

This is a discussion on Any race conditions involved on adding/mod users from differentprocesses - Security ; Hi, If I am adding or modifying users -useradd,usermod(entries in /etc/ passwd) simultaneously from different processes, Is it safe to do that ?. Does linux internally take care of all race conditions ? Thanks Reji Thomas...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Any race conditions involved on adding/mod users from differentprocesses

  1. Any race conditions involved on adding/mod users from differentprocesses

    Hi,

    If I am adding or modifying users -useradd,usermod(entries in /etc/
    passwd) simultaneously from different processes, Is it safe to do
    that ?. Does linux internally take care of all race conditions ?

    Thanks
    Reji Thomas

  2. Re: Any race conditions involved on adding/mod users from different ?processes

    Reji wrote:
    > Hi,
    >
    > If I am adding or modifying users -useradd,usermod(entries in /etc/
    > passwd) simultaneously from different processes, Is it safe to do
    > that ?. Does linux internally take care of all race conditions ?
    >
    > Thanks
    > Reji Thomas


    There is no control on race conditions.

  3. Re: Any race conditions involved on adding/mod users from differentprocesses

    Reji wrote:
    > Hi,
    >
    > If I am adding or modifying users -useradd,usermod(entries in /etc/
    > passwd) simultaneously from different processes, Is it safe to do
    > that ?. Does linux internally take care of all race conditions ?
    >
    > Thanks
    > Reji Thomas


    All? No. But by using useradd, it provides lockfiles that help protect you
    from conflicts.

+ Reply to Thread