Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-09-2006, 03:56 PM
|
#1
|
Member
Registered: Oct 2002
Location: Belgrade, Yugoslavia
Distribution: Linux Mandrake 10.0
Posts: 71
Rep:
|
Create new user and copy the privilages
Hello,
My friend has administrative rights on a server running Ubuntu and I often login using his account. But we would like to create a new user account for me that would be identical to the one that already exists (ie to have all the same privilages). How can I do this?
I am logging in using putty, so I only have the command line available.
Thank you very much
Relja
P.S. I am quite new to linux. Had a bit of experience with it since I used if for 2/3 years, but I know only very basic stuff..
|
|
|
10-09-2006, 04:30 PM
|
#2
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
|
I would say to just make sure your user belongs to all the same groups that he does (including his username group). That should fix most of it, I believe.
|
|
|
10-09-2006, 06:21 PM
|
#3
|
Member
Registered: Oct 2002
Location: Belgrade, Yugoslavia
Distribution: Linux Mandrake 10.0
Posts: 71
Original Poster
Rep:
|
Thanks for the answer - but I probably wasn't clear enough.
I don't really know how to create a user, how to make him belong to some groups etc.. So if someone could write the relevant commands so that I can maybe explore a bit more about them on google or something.
Thanks
|
|
|
10-09-2006, 07:52 PM
|
#4
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
|
First, as your friend's user, type groups and write down all the groups he belongs to (like adm, floppy, cdrom, users, etc). Then type
Code:
sudo useradd -G adm,disk,dialout,cdrom,floppy,audio newusername
This should add a new user with login newusername and a home directory, etc, etc. The -G switch is followed by the list of groups you copied down, these are the supplemental groups you want to belong to.
|
|
|
10-09-2006, 08:12 PM
|
#5
|
Member
Registered: Oct 2002
Location: Belgrade, Yugoslavia
Distribution: Linux Mandrake 10.0
Posts: 71
Original Poster
Rep:
|
Thanks very much. I found out which groups does my friend belong to (by typing in groups). Then I did the sudo command, and it got executed without any errors/warnings.. But then (after searching a bit more on the useradd command) I tried
But that gives an error that the user doesn't exist? The same error appears if I try
Thanks
|
|
|
10-09-2006, 08:40 PM
|
#6
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
|
Did you do sudo passwd newusername?
Also, you'll need to add your newusername to the sudoers file. As your friends user type sudo visudo then edit the file so that a similar line occurs to your friends (just change the username).
|
|
|
10-10-2006, 04:43 AM
|
#7
|
Member
Registered: Oct 2002
Location: Belgrade, Yugoslavia
Distribution: Linux Mandrake 10.0
Posts: 71
Original Poster
Rep:
|
Now I get the permission denied error, which probably means that my friend's account doesn't have root privilages as we originally tought. Thank you very much for all the help and I think that it will all be working once we contact the real administrator..
|
|
|
All times are GMT -5. The time now is 01:42 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|