Savoir ID dans un script

Bonjour tout le mo nde,

Qqun c comment identifier un user dans un scrirp , je sais qu'il existe une maniere de le choper ms g oublié :'(

Merci .

1 réponse

  1. Modérateur
    Quel shell?
    Sous bash:
    [johand@anubis johand]$ echo $UID
    1000
    [johand@anubis johand]$ echo $EUID
    1000
    [johand@anubis johand]$ id johand
    uid=1000(johand) gid=1000(johand) groupes=1000(johand)

    Gates gave you the windows.
    GNU gave us the whole house.(Alexandrin)
    0