LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-23-2004, 05:49 PM   #1
yulitao
LQ Newbie
 
Registered: Mar 2004
Posts: 18

Rep: Reputation: 0
Questions if "id" command!


I created a user is john, and his group is business, I found the business group's ID is 500
when I use less /etc/group. but when I use id -g business , it shows "id:business:no such user", and then I run id -u john, it shows 502, why id -g business doesn't work??????????????????????????????
 
Old 03-23-2004, 06:33 PM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Re: Questions if "id" command!

Quote:
Originally posted by yulitao
when I use id -g business , it shows "id:business:no such user", and then I run id -u john, it shows 502, why id -g business doesn't work?
"id" only takes an username as an argument. When you do "id -g business" this will not print the group-ID of the group "business", but it tries to print the (effective) group ID of user "business", which doesn't exist.

Try: id -G john
This will print the groups-ID's user "john" is member of.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 07:42 AM
Linux "make" command questions. schapman43 Linux - Hardware 12 09-02-2005 11:26 PM
Tiny Sofa 2.0 - I thought "halt", "reboot" were only root command ?? sorcerer Linux - Distributions 1 08-21-2004 03:28 PM
newbie questions about "pipe" command 286 Linux - Newbie 6 12-20-2003 07:25 PM
"segmentation error" when issuing "useradd" command through terminal with RH 9.0 kaihuang Linux - General 0 10-21-2003 11:47 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration