Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I would like to change root password on my linux system.
I know that usual command is "passwd".
However, if I type passwd I'm offered to change password for the user Micik. When I installed my open suse I have defined user Micik (me) with root priviledge. When I inspect passwd file, I can see that there are both root and Micik users, and also when I type su root I can log in as root user.
Now, I would like to distinguish root from Micik (to have separate) passwords.
How can I do that?
excerpt from 'man passwd';
passwd - change user password
passwd [options] [LOGIN]
The passwd command changes passwords for user accounts. A normal user may only change the
password for his/her own account, while the superuser may change the password for any account.
passwd also changes the account or associated password validity period.
The user is first prompted for his/her old password, if one is present. This password is then
encrypted and compared against the stored password. The user has only one chance to enter the
correct password. The superuser is permitted to bypass this step so that forgotten passwords may
After the password has been entered, password aging information is checked to see if the user is
permitted to change the password at this time. If not, passwd refuses to change the password and
The user is then prompted twice for a replacement password. The second entry is compared against
the first and both are required to match in order for the password to be changed.
Then, the password is tested for complexity. As a general guideline, passwords should consist of
6 to 8 characters including one or more characters from each of the following sets:
ˇ lower case alphabetics
ˇ digits 0 thru 9
ˇ punctuation marks
Care must be taken not to include the system default erase or kill characters. passwd will
reject any password which is not suitably complex.
Just a few links to aid you to gaining some understanding;
Thank you for replies. Of course I have read the man and I tried passwd root, but that didn't help me much because I manage to change password for root, but somehow I have lost super user right to user Micik.
When installing suse I entered only one user (Micik) which was usper user.
Later I have noticed that there is root user in passwd file and I tried login as root (su root) with password supplied to user Micik and it worked. This meant that one password is the same for both root and Micik.
I wanted to separate passwords for these users so I can have two users with admin priviledges.
You can use 'passwd' to change the passwords. You should have unique passwords for your users, be it root or normal users. All users, including root should have secure individual passwords. You might consider using 'su -' for your users;
excerpt from 'man su';
su - change user ID or become superuser
su [options] [username]
The su command is used to become another user during a login session. Invoked without a username,
su defaults to becoming the superuser. The optional argument - may be used to provide an
environment similar to what the user would expect had the user logged in directly.
Additional arguments may be provided after the username, in which case they are supplied to the
user´s login shell. In particular, an argument of -c will cause the next argument to be treated
as a command by most command interpreters. The command will be executed by the shell specified in
/etc/passwd for the target user.
You can use the -- argument to separate su options from the arguments supplied to the shell.
The user will be prompted for a password, if appropriate. Invalid passwords will produce an error
message. All attempts, both valid and invalid, are logged to detect abuse of the system.
The current environment is passed to the new shell. The value of $PATH is reset to /bin:/usr/bin
for normal users, or /sbin:/bin:/usr/sbin:/usr/bin for the superuser. This may be changed with
the ENV_PATH and ENV_SUPATH definitions in /etc/login.defs.
A subsystem login is indicated by the presence of a "*" as the first character of the login
shell. The given home directory will be used as the root of a new file system which the user is
actually logged into.
The options which apply to the su command are:
-c, --command COMMAND
Specify a command that will be invoked by the shell using its -c.
-, -l, --login
Provide an environment similar to what the user would expect had the user logged in directly.
When - is used, it must be specified as the last su option. The other forms (-l and --login)
do not have this restriction.
Not really a good thing to equate users as root. One system one 'root'! Keep it secure and clean. You will have less confusion and potential problems removed.