Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    3

    Question User unique ID

    Hello,

    I searched all around but couldn't find the answer. Does cPanel creates a Unique user id that never changes for each user? If so, how can I retrieve it? If not, how is the best way to make this?

    I'm trying to integrate some of my site systems with cPanel for each user.

    Thank you in advance,
    Guilherme Mori
    Last edited by guiligan; 04-17-2010 at 10:35 AM.

  2. #2
    Member
    Join Date
    Dec 2003
    Location
    France
    Posts
    300
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    You can fetch usernames, userids and groupids from /etc/passwd
    Marie - Co-Owner
    Need Further Assistance ? Here you go !
    English, french and spanish support

  3. #3
    Registered User
    Join Date
    Apr 2010
    Posts
    3

    Smile

    Quote Originally Posted by yapluka View Post
    You can fetch usernames, userids and groupids from /etc/passwd
    Hey yapluka, thanks for answering!
    On passwd i have something like this
    user:x:512:512::/path:/another/path
    the first number is userid and the second is groupid?
    And is there a way the get this using the cPanel API?

    Thank you,
    Guilherme Mori

  4. #4
    Registered User
    Join Date
    Apr 2010
    Posts
    3

    Default

    Ok, managed to get the info using the passwd. Can someone tell me which number is the userid?

    thank you!

  5. #5
    cPanel Staff cPanelMatt's Avatar
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    409

    Default

    The first number is the UID.

    if the process is already running as the user (php under suphp, suexec cgi, cpanel) you can always use "getpwuid" which is available in both php and perl.
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

Similar Threads & Tags
Similar threads

  1. apache unique ip
    By arkain in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-24-2007, 02:25 PM
  2. Webalizer unique visitors are different from awstat unique vistors
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-09-2006, 05:00 AM
  3. is hostname required to be unique?
    By rastoma in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-26-2002, 10:25 PM
  4. check this UNIQUE skin ..
    By 2mhost.com in forum Themes and Branding
    Replies: 1
    Last Post: 02-26-2002, 09:30 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube