Groups is not visible


 
Thread Tools Search this Thread
Operating Systems Solaris Groups is not visible
# 1  
Old 02-13-2016
Groups is not visible

OS : SunOS 5.8

I am trying to add a user ad3059 to the following groups,
Code:
A   B   C   D ( four groups A,B,C,D)

When i use usermod command and add the user to the above groups,

and go to
Code:
> groups ad3059
other C D

It doesnt show A and B groups and shows it as other.Please advice on how can we fix the issue

Last edited by Don Cragun; 02-13-2016 at 04:01 AM.. Reason: Add CODE and ICODE tags.
# 2  
Old 02-13-2016
Exactly what usermod command or commands did you use to add that user to those four groups?

How many other users are in groups A and B?

How many groups include user ad3059?

What output do you get from the command:
Code:
grep 'ad3059' /etc/group

and from the command:
Code:
grep '^A:' /etc/group

(where A is the name of one of the groups that you have added user ad3059 to that is not showing up after you have added that user to the group, that user has logged out, that user has logged back in, and that user runs the command:
Code:
groups

)?
# 3  
Old 02-13-2016
Hello Don,

Thank you for the quick reply,

I created the user using the below command,
Code:
useradd -G A,B,C,D -d /msdhome/ad3059 -m ad3059

its only these four groups that is with this particular user.

Output:
Code:
grep 'ad3059' /etc/group
D::2098:ad3059
C:*:2015:ad3059

Kindle help me the procedure to add user ad3059 to group A and B as well,

---------- Post updated at 03:25 AM ---------- Previous update was at 03:20 AM ----------

Code:
# grep '^A:' /etc/group

Is not showing any result
Code:
root@bnesrv #  grep '^A:' /etc/group
root@bnesrv #  grep '^A:' /etc/group


Last edited by Scrutinizer; 02-13-2016 at 04:42 AM.. Reason: code tags
# 4  
Old 02-13-2016
If grep '^A:' /etc/group is showing no output, group A must not exist. I see nothing in the usermod man page saying that it will create new groups.

Try using /usr/sbin/groupadd to add the new groups to /etc/group and then rerun the usermod command to add that user to the newly created groups.

Last edited by Don Cragun; 02-13-2016 at 06:35 AM.. Reason: Fix typos: s/useradd/usermod/
# 5  
Old 02-13-2016
Hello Don,

Group A exists ,meaning if i do the following command,
Code:
root@bnesrv50 # getent group | grep -i A
A:*:2560:a9ad3059,a9an2462,a9ap2447,a9cb2519,a9dm3678,a9es5342,a9jc2364,a9jd3062,a9jl1987,a9lz6481,a9nh4814,a9nm2713,a9rs2507,a9wa2556,ah1901,alastair,at2tha,bryans,c9dg2497,c9fl6347,c9pm2994,c9rc2865,cw2659,dennism,dr2551,eliza,fg2287,ge1700,gkelly,ja2406,jdowling,jkennedy,mf3525,mw2955,petewil,philob,pv2571,rakesh,rg4365,rj2619,rv3526,sl3353,sorcha,t9ar4510,t9ds4473,t9ga4650,t9jg2677,t9kk4511,t9km3147,t9lp4607,t9mt4512,t9ng4556,t9ns4681,t9ra4517,t9rb4551,t9rk4550,t9rs4518,t9rs4519,t9rs4687,t9rv4688,t9sk4509,t9sn4558,t9tk5064,t9tl2850
root@bnesrv50 # getent group | grep -i B
B:*:2560:a9ad3059,a9an2462,a9ap2447,a9cb2519,a9dm3678,a9es5342,a9jc2364,a9jd3062,a9jl1987,a9lz6481,a9nh4814,a9nm2713,a9rs2507,a9wa2556,ah1901,alastair,at2tha,bryans,c9dg2497,c9fl6347,c9pm2994,c9rc2865,cw2659,dennism,dr2551,eliza,fg2287,ge1700,gkelly,ja2406,jdowling,jkennedy,mf3525,mw2955,petewil,philob,pv2571,rakesh,rg4365,rj2619,rv3526,sl3353,sorcha,t9ar4510,t9ds4473,t9ga4650,t9jg2677,t9kk4511,t9km3147,t9lp4607,t9mt4512,t9ng4556,t9ns4681,t9ra4517,t9rb4551,t9rk4550,t9rs4518,t9rs4519,t9rs4687,t9rv4688,t9sk4509,t9sn4558,t9tk5064,t9tl2850

The output shows that the group A and B exists,
Also when i check for other user,
Code:
#groups inf7
A B mincom

Looks like the above user inf7 has been added to the A,B group.

So the groups actually exists.Please guide me on what can be done.Thanks in advance.

Last edited by Scrutinizer; 02-13-2016 at 06:45 AM.. Reason: code tags
# 6  
Old 02-13-2016
So what other database is holding the groups information for your system. Note that user inf7 is not in group A or B (which do not exist in /etc/group) and is not in group A or B in the getent group group A or B shown in the list you provided in post #3 in this thread. It is also interesting to note that there is no need to add someone to both groups; both groups have the same group ID (2560).

Note also that you have also shown us that user ad3059 does not exist in the getent group output for groups C or D either, so it appears that user ad3059 only appears in the local /etc/group file; not in the network's group database. (I say this because the grep -i a would show all occurrences of ad3059 in the network's group database.)

So, it appears that user ad3059 is not in the network's group database and only appears in the system's local files (/etc/passwd and /etc/group) where there is no group A and there is no group B.

It has been a couple of decades since I worked on a Solaris 8 system, and I don't remember how it determined who would be found in local user and group databases and who would be found in network user and group databases. I also seem to remember limits on the length's of lines in the user and group databases (both local and networked) which is probably why you have group A and B in the remote group database with the same group ID. Maybe you can't add any more users to those groups because you have reached that limit. But, I am surprised that you didn't get any error messages from usermod if that was the reason for failing to add ad3059 to those remote groups.
# 7  
Old 02-13-2016
Thanks Don,

I am not sure why i am able to add the user to group CD but not AB.
when i give
Code:
#grep 'ad3059' /etc/group D::2098:ad3059 C:*:2015:ad3059

But not A and B not sure

Last edited by Scrutinizer; 02-13-2016 at 07:11 AM.. Reason: code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Content of posts aren't visible - only subject

Let's see if this works here. (Except I can't post a URL ...) I posted the thread above and you can't see content, only the subject title. Moderator Don Cragun replied to the post in Shell scripting and programming. (2 Replies)
Discussion started by: Dalej
2 Replies

2. Post Here to Contact Site Administrators and Moderators

Thread 2nd page not visible

Hi, I am not able to see second page of my last post, giving me message database corrupted. Please check. (7 Replies)
Discussion started by: learnbash
7 Replies

3. Shell Programming and Scripting

Not visible hidden folder

Hi, In one folder there is a hidden folder. Whenever i do any ls -a i can't see the folder. However i can get into the folder by cd .foldername. Would you please help me to identify what is the problem here. (13 Replies)
Discussion started by: anupdas
13 Replies

4. Solaris

folder not visible in ls -l

Hi, I have a strange problem. when i do ls i see a folder, say 'abc', but it disappears when i do ls -l. I cannot access or mv that folder. Solaris 10 (SPARC) doesn't allow me to create a new folder with the same name, as it already exists. 'file' command also doesn't recognize i 'abc'... (10 Replies)
Discussion started by: Mack1982
10 Replies

5. Red Hat

[ URGENT] - HDD visible to OS without reboot

Hi, I have added 30 GB Vmware Scsci disk in RHEL # cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.3 (Tikanga) I want to make this 30 GB visible to OS without reboot. Pls help (1 Reply)
Discussion started by: saurabh84g
1 Replies

6. UNIX for Advanced & Expert Users

A file system visible for solaris and windows?

Hi, I have a 1TB external iomega hard disk, and I want to plug it to a solaris 8 machine. The problem is that solaris doesn't recognize the NTFS file system partition. I was thinking of formatting it to FAT32, but I would like to know if anyone knows a better file system, considering: - I... (6 Replies)
Discussion started by: Dann-E
6 Replies

7. Web Development

images are not visible

hi, why my uploaded images are not visible both in front-end and back-end of my CMS ? See the picture: http://dl-client.getdropbox.com/u/72686/noPics.png I checked the GD library in php. It seems ok... http://dl.getdropbox.com/u/72686/GD.png thanks ---------- Post updated at... (0 Replies)
Discussion started by: aneuryzma
0 Replies

8. Shell Programming and Scripting

Why are the xml tags not visible?

Could some one please tell me why, when I run the following php code: <HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY> <?php $readfile = file("rss_file.xml"); for ($k=0; $k<=count($readfile)-1; $k++) { echo "$readfile<br>"; } </BODY> </HTML> the tags do not appear in... (1 Reply)
Discussion started by: photon
1 Replies
Login or Register to Ask a Question