LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 07-17-2012, 03:27 AM   #1
Ajit Gunge
Member
 
Registered: Jan 2008
Location: Pune
Distribution: RHEL,fedora
Posts: 253
Blog Entries: 1

Rep: Reputation: 21
Question Granting same access rights to two users?


Hi All,

I have a user say ABC already created in system.Now I want to create another user that has all the similar priviliges that of ABC.Is there a command using which I can create that new user or grant him the same access rights as ABC.Please let me know.

Thanks,
 
Old 07-17-2012, 04:01 AM   #2
torchnw
LQ Newbie
 
Registered: Jun 2008
Distribution: Ubuntu, Debian, Mint, Fedora, Arch
Posts: 23

Rep: Reputation: 4
Not sure if this is what you're asking for, but if you want to give several users the same permissions, you use groups.

Create a new group and give ownership of whatever files you need to this group
Code:
# groupadd abcgroup
# chown -R :abcgroup /path/to/files/
Add the user to the group
Code:
# usermod -G abcgroup ABC
Show what groups a user is a member of.
Code:
# groups ABC
When creating the new user ( say DEF ), you can add this group straight away
Code:
# useradd -G abcgroup DEF
 
1 members found this post helpful.
Old 07-17-2012, 01:13 PM   #3
Lexus45
Member
 
Registered: Jan 2010
Distribution: Debian, Centos, Ubuntu, Slackware
Posts: 361
Blog Entries: 3

Rep: Reputation: 48
Quote:
Originally Posted by torchnw View Post
Add the user to the group
Code:
# usermod -G abcgroup ABC
A little note.
The "-G" option adds the user to the specified group and deletes from all other groups.
So, if you want to add a user to some group and to leave him in other on the same time, do it in this way:
Code:
usermod -aG newgroupname username
The "a" option will prevent the user from being removed from other groups.
 
Old 07-17-2012, 06:53 PM   #4
xj-linux
Member
 
Registered: Feb 2006
Location: Minnesota
Distribution: SUSE - AIX
Posts: 30

Rep: Reputation: 2
smitty user
Add the new user to the group ABC is in.
 
Old 07-18-2012, 11:23 PM   #5
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,210
Blog Entries: 1

Rep: Reputation: 1570Reputation: 1570Reputation: 1570Reputation: 1570Reputation: 1570Reputation: 1570Reputation: 1570Reputation: 1570Reputation: 1570Reputation: 1570Reputation: 1570
or: mcedit /etc/group -- simple and platform-independent
 
  


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
Granting apache sudo rights secure? guerreroJesus Linux - Security 3 10-03-2010 05:23 AM
Granting full write access to another users web directory acctman Linux - Server 2 02-12-2009 05:32 PM
Granting rights to shutdown ifeatu Linux - Newbie 2 10-31-2008 01:55 PM
Granting users access to external media devices? byebyebilliegates SUSE / openSUSE 5 07-22-2007 12:24 AM
Granting users full internet access!? adham1sa Linux - Networking 3 12-22-2004 06:08 AM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 04:40 AM.

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