Sponsored Content
Operating Systems Linux Ubuntu Root access that can't change root password? Post 302879818 by bartus11 on Sunday 15th of December 2013 04:22:44 PM
Old 12-15-2013
One way to do it is to disable "su" and "passwd" access in sudoers, for example like this:
Code:
user ALL=(ALL) ALL, !/usr/bin/passwd, !/usr/bin/su

Then tell user to run the commands that he needs executed as root by prefixing them with "sudo".

It will not prohibit manually editing the /etc/shadow file though...
 

9 More Discussions You Might Find Interesting

1. Linux

how to access root priveliges if root password is lost

wish to know how to access root password it root password is forgotten in linux (1 Reply)
Discussion started by: wojtyla
1 Replies

2. Solaris

change root password

Hi, please advise me what is the simplest way to change root password on Sun Sparc 64 bit with Solaris 9 on it. Thanks in advance. (3 Replies)
Discussion started by: duke0001
3 Replies

3. UNIX for Dummies Questions & Answers

Change other account password from root access

Hi, I have forgotten my personal account password but I still have the root access to the box. Please tell me how can I change my other account password by logging as root. Thanks. Rakesh :D (4 Replies)
Discussion started by: rakeshou
4 Replies

4. HP-UX

Change root password?

Hello! I forget the root password and I need to change it. I've read others threads about it in this forum, but it seems it's necessary to modify /etc/passwd file. In my HPUX Systems this passwd file have only "read" permissions ant its owner is the root user, so how can i modify this file, if I... (4 Replies)
Discussion started by: kaugrs
4 Replies

5. HP-UX

How to change ROOT password.

Hi, we have a HP-UX server of model 9000/800/rp4440. We have been trying to reset the root password but are in vain.I used the following command and also are the outputs which i have received. # passwd Changing password for root New password: Re-enter new password: Unexpected failure.... (3 Replies)
Discussion started by: angelofhell
3 Replies

6. Shell Programming and Scripting

how to change root password using shell script with standard password

Hi Friends. I am new to scripting now i want to change the root password using the script with standard password. which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Discussion started by: kurva
2 Replies

7. Solaris

Solaris 8 - Asks for current root password when trying to change root password.

Hello All, I have several solaris boxes running Solaris 8. When changing root passwords on them, all will simply ask for the new root password to change and of course to re-type the new password. One of the systems however asks for the existing root password before it will display the new password... (8 Replies)
Discussion started by: tferrazz
8 Replies

8. UNIX for Advanced & Expert Users

One user to su to another without allowing root access and password

Hello Gurus, I want One user to su to another without allowing root access and password. I want to run a specific command as below from user am663: --------------------------------------------------------- sudo -u appsprj4 /home/appsrj4/scripts/start_apache.sh ------------------- But... (6 Replies)
Discussion started by: pokhraj_d
6 Replies

9. UNIX for Beginners Questions & Answers

Can a root role change the root password in Solaris 10?

i do not have root on a solairs 10 server , however i do have the root role, i was wondering if I can change the root password as a a role with the passwd command? I have not tried yet. and do i have to use the # chgkey -p afterwards? i need to patch is why i am asking. thanks (1 Reply)
Discussion started by: goya
1 Replies
ADDING_USER(8)						    BSD System Manager's Manual 					    ADDING_USER(8)

NAME
adding_user -- procedure for adding new users DESCRIPTION
A new user must choose a login name, which must not already appear in /etc/passwd or /etc/mail/aliases. It must also not begin with the hyphen '-' character. It is strongly recommended that it be all lower-case, and not contain the dot '.' character, as that tends to confuse mailers. An account can be added by editing a line into the passwd file; this must be done with the password file locked e.g. by using chpass(1) or vipw(8). A new user is given a group and user id. Login and user id's should be unique across the system, and often across a group of systems, since they are used to control file access. Typically, users working on similar projects will be put in the same groups. At the University of California, Berkeley, we have groups for system staff, faculty, graduate students, and special groups for large projects. A skeletal account for a new user ``ernie'' might look like: ernie::25:30::0:0:Ernie Kovacs,508 Evans Hall,x7925, 642-8202:/a/users/ernie:/bin/csh For a description of each of these fields, see passwd(5). It is useful to give new users some help in getting started, supplying them with a few skeletal files such as .profile if they use /bin/sh, or .cshrc and .login if they use /bin/csh. The directory /usr/share/skel contains skeletal definitions of such files. New users should be given copies of these files which, for instance, use tset(1) automatically at each login. FILES
/etc/master.passwd user database /usr/share/skel skeletal login directory SEE ALSO
chpass(1), finger(1), passwd(1), aliases(5), passwd(5), adduser(8), pwd_mkdb(8), vipw(8) BSD
January 30, 2009 BSD
All times are GMT -4. The time now is 03:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy