Mailinglist Archive: opensuse (1690 mails)

< Previous Next >
Re: [opensuse] Post installation queries (FIRST successful installation of Linux)
On 11/04/2011 09:41 AM, Linux Tyro wrote:
On Fri, Nov 4, 2011 at 9:22 AM, David C. Rankin
<drankinatty@xxxxxxxxxxxxxxxxxx> wrote:

AYE YIE YIE! Please fix your e-mail client so it doesn't quote my (or anyone elses) full e-mail in your replies :) Spammers harvest e-mail address from these lists and it just means more junk mail for people trying to help you. I don't know why the idiots that set up mail clients set this as default. Let us know what mail client you are using and we'll tell you how to fix it...

Done! Now you can su without a password from your normal user. Try it! Open
a new xterm and just type 'su' - you should become root immediately without
a password.

For 'sudo' it worked but for 'su' I still need to enter the password.

The complete /etc/pam.d/su file should look like this:

10:34 alchemy:~> sudo cat /etc/pam.d/su
auth sufficient
auth sufficient trust use_uid
auth required use_uid
auth include common-auth
account sufficient
account include common-account
password include common-password
session include common-session
session optional

Another thing is that I created an user (during installation) with a
name, say, 'name1' and after getting desktop of 'name1', I changed
this name to
'name_new'. But now when see the contents of '/home', the directory of
'linux~' is also there, which user is this one...? One directory is
for 'name_new', that's okay but for 'linux~', I don't know, how did it
come into existence...?


My guess is that you created them somehow during the install. The easiest way to manage users on opensuse is with yast. So just do:

sudo yast

This will open the text version of yast and then just navigate to:

Security and Users -> User and Group Management

You can also just use the normal GUI interface for yast, but it is good to get familiar with the text interface in the event you ever need to manage your box remotely (over ssh, etc..). The text interface is very good and much easier to manage remotely.

Once you get to User and Group Management, you will see the list of users installed on your box. Just add or delete or rename to your liking. But I wouldn't delete your own user.

You can also do the same with the command line commands of: useradd userdel and usermod (and their group companions of groupadd groupdel and groupmod). You use the 'passwd' command to change the passwords from the command line. By default, if you su to root, you can change/reset any user password simply by issuing the command:

passwd theUserName

or just

passwd (to change the current user/root's passwd)

What yast User and Group Management does is manage the useradd/usermod/userdel, groupadd/groupmod/groupdel and passwd for you with its interface.

Remember, working from the command line will give you the most flexibility, but Yast is pretty good for most uses. When you run into a command that you don't know the options for, in Linux you can usually just do:

command --help


man command

That will give you the help file or manual page for nearly all commands. E.g.:

10:47 alchemy:~> useradd --help
Usage: useradd ...
useradd - create a new user

-c comment Set the GECOS field for the new account
--show-defaults Print default values
--save-defaults Save modified default values
-D binddn Use dn "binddn" to bind to the LDAP directory
-d homedir Home directory for the new user
-e expire Date on which the new account will be disabled
-f inactive Days after a password expires until account is disabled
-G group,... List of supplementary groups
-g gid Name/number of the users primary group
-k skeldir Specify an alternative skel directory
-m Create home directory for the new user
-o Allow duplicate (non-unique) UID
-P path Search passwd, shadow and group file in "path"
-p password Encrypted password as returned by crypt(3)
-u uid Force the new userid to be the given number
-U umask Umask value used for creating home directory
-r, --system Create a system account
-s shell Name of the user's login shell
--service srv Add account to nameservice 'srv'
--help Give this help list
--usage Give a short usage message
-v, --version Print program version
Valid services for --service are: files, ldap

Revisit the su setup. It really is a time saver once you get it set up. One more note -- and I hate this about the recent openSuSE installs -- you must tell the installer to set a traditional root account and password during setup or it just creates a 'Super User' out of the user account used during install. That may be the problem with your su setup. I've never let the installer do that to me, so others will need to chime in on how to fix it.

You may prefer the newfangled 'Super User' created by the installer, but I for one always want a traditional 'root' account and root password and then I want to create my 'user' accounts.

Also, don't freak out about the user directories that get created under /home. They are just individual directories that hold the personal files for the users that get created. E.g.:

10:57 nirvana:~> ls -al /home
total 84
drwxr-xr-x 18 root root 4096 Oct 10 23:08 .
drwxr-xr-x 22 root root 4096 Oct 30 23:28 ..
drwxr-x--- 4 david david 4096 Dec 30 2010 admin
drwxr-xr-x 2 alan alan 4096 May 5 2011 alan
drwxr-xr-x 2 anna anna 4096 May 5 2011 anna
drwxr-xr-x 10 david david 4096 Oct 4 13:27 backup
drwxr-x--- 48 david http 4096 Nov 4 10:57 david
drwxr-xr-x 20 deborah dcr 4096 Aug 9 20:03 deborah
drwxr-xr-x 2 dell dell 4096 May 5 2011 dell
drwxr-xr-x 2 drr drr 4096 May 5 2011 drr
drwxr-xr-x 4 david david 4096 Oct 10 23:08 dv
drwxr-xr-x 8 jordan jordan 4096 Aug 10 17:04 jordan
drwx------ 2 root root 16384 Jul 23 10:59 lost+found
drwxr-xr-x 20 david david 4096 Jul 22 07:40 samba
drwxr-xr-x 9 sydney sydney 4096 Aug 10 17:04 sydney
drwxr-xr-x 14 zachry zachry 4096 Oct 23 22:03 zachry

If there are users created that you no longer want, then delete the user in Yast or with userdel. If you use 'userdel -r' then the directory under /home will be deleted as well. If yast doesn't do that, then you can manually delete the directory after you remove the user.

Good luck and good choice of openSuSE for your first linux install.

David C. Rankin, J.D.,P.E.
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups