Results 1 to 3 of 3
  1. #1

    Unix Real Name/Comment Access

    Alright, what I am trying to do is write a chroot script so that when a user logs in via SSH, their jail is set up appropriately. Now, to do this the way I want to (based on the filesystem layout I've constructed), I need to know what domain they are using.

    I thought perhaps that I might just make their username <user>@<> but I can't have the '@' character in a username. Somehow Ensim does this I think but I am not sure how.

    Another idea I had was to just use the real name/comment field in /etc/passwd. However, I can't seem to find anyway to access this value programmatically (specifically through a bash script). Either through an environment variable or an external program. Anyone have an idea?

  2. #2
    Join Date
    Jun 2001
    Chicago, IL
    well, I guess if you wanted to do it via an external program, it would be no problem. Just make a simple text file(or if its big) then a database of usernames and their corresponding domains, then run that program via whaever means you do it now, get the output and use it. Seems simple enough to do it via perl.
    Chicago Electronic Cigarettes: Tobacco Free, Smoke Free. 3 E-Cig Models, 11 flavors, and accessories.

  3. #3
    Join Date
    Sep 2002
    #grep username | awk -F: '{print $5}' /etc/passwd
    GUI admin tools have no honor. It is a good day to vi.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts