Visit Our UNIX and Linux User Community


Hw to create root-equivalent accounts?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Hw to create root-equivalent accounts?
# 1  
Old 01-25-2002
CPU & Memory Hw to create root-equivalent accounts?

Hi all.
After installing ssh on a server, i'd like to create a user with root privileges.
My problem is that after creating a user rootssh (uid=0, gid=20, /home/rootshh), i make rootssh's ssh keys. The problem is that normally the ssh-keygen should create the keys under $HOME/.ssh/, and actually it creates 'em under /.ssh ( / being my root home, this cannot be modified). How am i supposed to create the user? ( i'm lokking for a Hp and Solaris solution...)

Thanx all
Smilie Smilie
penguin-friend
# 2  
Old 01-25-2002
That's the pain with having more than one root user... Since the UID=0, it'll either take set your variable to root's (like USER, LOGNAME, HOME...), or just plain assume you're root based on UID=0...

You can try setting the variables manually via the .profile / .login, but it's usually just better to use su / sudo.

Hope this helps.
# 3  
Old 01-25-2002
In fact, the creation of this account is do avoid the use of root's passwd. We are trying to avoid any pure root use.
Would i have to set HOME to be /home/rootssh in the .profile?
penguin-friend
# 4  
Old 01-25-2002
Yes, you could do that...
when logged in as the "real" root, type "env", and look for any reference that you might need to set manually in the .profile.

For example, on a test Linux box here, I'd have to change:
USER
MAIL
LOGNAME
HOME
And maybe make double sure that "." isn't in the PATH.

So, why are you giving out root accounts to people you don't want to have the root password? They have the equivilent now, and could even change root's passwd now.

You really might want to look into "sudo" for your needs...
# 5  
Old 01-25-2002
Yes surely, but i'm not the payer!
I just checked to env for both root and rootssh, HOME is correctly positionned for both. Rootssh's home is /home/rootssh and root is /.
WHya doesn't ssh-keygen see the difference?
penguin-friend
# 6  
Old 01-25-2002
This may or may not be helpful, but I downloaded openssh from http://www.sunfreeware.com and when I run ssh-keygen it asks me for the location to store the rsa1 keyfile. I specify the path where I want to store it, then change the sshd-config file to reflect the location of the keyfile. I use a secondary UID=0 account (not root) and I can ssh at will.

Obviously, the binaries from sunfreeware will only run on Solaris, but that's half your problem.
# 7  
Old 01-28-2002
that's surely half of my problem! but are you creating your box's rsa1 keys, or your user keys?
Could you give me that particular line in your sshd_config file?
penguin-friend

Previous Thread | Next Thread
Test Your Knowledge in Computers #671
Difficulty: Medium
DOS primarily consists of Microsoft's MS-DOS and a rebranded IBM version under the name PC DOS, both of which were introduced in 1981.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Create the equivalent of the command WC

hi all, i'm trying to do this exercise, i want to create a script that can substitute WC command in unix, can someone help me? (11 Replies)
Discussion started by: Marina2013
11 Replies

2. AIX

Equivalent uid to root

Hi all I have a strange problem on one my my AIX machines. We have created a user called testroot with the same UID as root (uid=0) by changing the uid of that user in the /etc/passwd file. I know that this is a security breach but this is a test system. Now the strange thing that happens is that... (3 Replies)
Discussion started by: abohmeed
3 Replies

3. Red Hat

How to check local accounts have root and user access rights ?

Hi, I have three servers,For 3 servers how i can take output,all the local accounts and details of whether the access is Root or User access. cheers (1 Reply)
Discussion started by: ranjithm
1 Replies

4. Shell Programming and Scripting

New To UNIX - Need Script to create report of user & group accounts

Hi, I'm new to the world of UNIX and have been asked to create a complex script (at least complex to me:confused:) for AIX UNIX to create a report of all the users on the server including server, user, UID, groups, GID, etc. Found a script using lsuser, but the output is still lacking. 2 things I... (2 Replies)
Discussion started by: panthur
2 Replies

5. Shell Programming and Scripting

Create a .sh file for an equivalent Excel VBA code

Hi guys, I am new to Unix, Need your help here. I have installed cygwin software (Unix) in my computer (Windows vista). Now i want to create a shell script (.sh file)/other script which is equivalent of VBA code (at the bottom) and then put this .sh file into bin directory of c:/cygwin. so... (7 Replies)
Discussion started by: bansalpankaj88
7 Replies

6. Shell Programming and Scripting

I have a requirement to check whose accounts are expired in Linux machine and send a mail to root

I have a requirement to check whose accounts are expired in Linux machine and send a mail to root user about the accounts. How can i achieve this in Linux? (1 Reply)
Discussion started by: mnmonu
1 Replies

7. Shell Programming and Scripting

script file which will automatically create accounts

How tocreate a script file which will automatically create accounts from a csv file (2 Replies)
Discussion started by: donegal92
2 Replies

8. Shell Programming and Scripting

Need a Shell script to create Multiple User Accounts

Hi All, Am New to shell scripting , Can u please Help me to Create a shell script which Creates Multiple Users (say up to 250 users) ,am using Rehat server 5 enterprise Edition .. I am really in need of this script So tat i can save time and effort for this Job .. KIndly help me Please ... (1 Reply)
Discussion started by: rksubash
1 Replies

9. UNIX for Dummies Questions & Answers

How to mount disk for non-root accounts?

I have a USB disk on a little NAS controller (NSLU2 running unslung 6.8) that I can access nicely with root with mount -t cifs \\\\10.134.23.23\\DISK\ 2 /mnt/LKGD7F73A However, when I run emacs from an user mode xterm prompt, emacs cannot read and write the files on /mnt/LKGD7F73A. Emacs can... (11 Replies)
Discussion started by: siegfried
11 Replies

10. UNIX for Dummies Questions & Answers

How to mount disk for non-root accounts?

Presently I have mounted a disk as su. I believe only root can mount disks -- is this correct? I had to run mozilla in the root account so I can download the new SuSE distribution to the new disk. How can I mount the disk so non-root accounts can access the disk? Thanks, Siegfried (4 Replies)
Discussion started by: siegfried
4 Replies

Featured Tech Videos