LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 03-17-2004, 01:53 PM   #1
adamrad
LQ Newbie
 
Registered: Mar 2004
Posts: 8

Rep: Reputation: 0
Unhappy How to add user with root privileges and SSH access


Hi,
I need to add a user with same power as root and need to be able to login to SSH.
I have added all groups that root form part of.

This is the command i used:
Code:
adduser -g root -G wheel,sys,bin,daemon,adm,disk -d / -s /bin/sh -p 3451 hord
Why can't i login through SSH as hord?

BTW what is the command to create a mysql user with all privileges(similar to mysql root)


Thanks for the replies..
 
Old 03-17-2004, 01:58 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
First of all, learn to use and setup sudo or just su if you need root's permissions, its more secure that way instead of giving users root's abilities.

Secondly, what is the error you recieve when you attempt to ssh into your machine? Is ssh running? Can any other users connect using ssh?

And you can create a user with all privileges on mysql with the following:

mysql> GRANT ALL PRIVILEGES on *.* to <user@host> IDENTIFIED by <password> WITH GRANT OPTION;
 
Old 03-17-2004, 01:59 PM   #3
adamrad
LQ Newbie
 
Registered: Mar 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Oops just found the answer in the thread 'can't login after create user'..
Quote:
The -p option expects an encrypted password
 
Old 03-17-2004, 02:19 PM   #4
adamrad
LQ Newbie
 
Registered: Mar 2004
Posts: 8

Original Poster
Rep: Reputation: 0
How can i setup su with a different password than root?

Last edited by adamrad; 03-17-2004 at 02:24 PM.
 
Old 03-17-2004, 02:33 PM   #5
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by adamrad
How can i setup su with a different password than root?
That's not the point of su. You'll want to setup sudo in that case. Its a way to allow root's privileges without using roots password.
 
Old 10-26-2006, 09:28 AM   #6
tsarlz
LQ Newbie
 
Registered: Aug 2005
Posts: 13

Rep: Reputation: 0
hi, i have the same problem. i need to create users with root previleges. this is necessary in my department because 6 of us are really administrator. can anyone provide the correct syntax? also, i need to setup their login to prompt for a change of password the first time they will use their ID.
 
Old 10-31-2006, 06:22 AM   #7
jon_k
Member
 
Registered: Jul 2003
Location: Fort Worth, Texas
Distribution: Mepis Linux 2004
Posts: 547

Rep: Reputation: 30
If you give a user the UID of root, it will have root access. I wouldn't make files or do much with it though, as you'll have a user called "bobby" with uid and gid of root, I figure it can bork file ownerships.

Users log in and use a program I wrote in C that is defined as the shell in the example below.


root:x:0:0:root:/root:/bin/bash
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
backemup:x:0:0:addme.bin,,,,:/home/backemup:/bin/backupadmin.c.bin

You see how I made "backemup" have 0:0 as the uid:gid?

If you do that to a user in /etc/password it will essentially give any user root privilages.

Sure, I could come up with an safer way to impliment this solution using sudo, but I'm lazy. However, this is provided for informational purposes, I still suggest you use "sudo" if you want to add users to the system or something. Either that or just su.

Last edited by jon_k; 10-31-2006 at 06:23 AM.
 
Old 10-31-2006, 07:06 AM   #8
slantoflight
Member
 
Registered: Aug 2005
Distribution: Smoothwall
Posts: 283
Blog Entries: 3

Rep: Reputation: 35
Quote:
Originally Posted by tsarlz
hi, i have the same problem. i need to create users with root previleges. this is necessary in my department because 6 of us are really administrator. can anyone provide the correct syntax? also, i need to setup their login to prompt for a change of password the first time they will use their ID.
why not share the same user? or use sudo? there usually no point in having multiple roots.
 
Old 10-31-2006, 03:53 PM   #9
coontie
Member
 
Registered: Jun 2003
Distribution: Fedora Core 5
Posts: 100

Rep: Reputation: 15
Quote:
Originally Posted by jon_k
If you give a user the UID of root, it will have root access. I wouldn't make files or do much with it though, as you'll have a user called "bobby" with uid and gid of root, I figure it can bork file ownerships.
that's not gonna "bork" anything, just a silly thing to do. UID is all that matters, names are irrelevant.

Quote:
Originally Posted by jon_k
Sure, I could come up with an safer way to impliment this solution using sudo, but I'm lazy. However, this is provided for informational purposes,

this "information" is worthless, really. It is totally insecure, and there are better, easier ways of doing things...

I don't understand...
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Root privileges for user ar1 Linux - Security 2 01-07-2005 10:33 PM
User with root privileges ShakyJake Linux - Newbie 2 06-18-2004 01:12 PM
Given regular user root privileges clo99dx Linux - Newbie 6 06-05-2004 05:27 PM
Giving a User Root Privileges lawrencegoodman Linux - Newbie 4 12-23-2003 05:41 PM
ssh access allowed only to root user? zovres Linux - Newbie 5 09-25-2003 05:19 PM


All times are GMT -5. The time now is 11:51 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration