Friday, June 28, 2013

Static background noise: Ubuntu 13.04, Kubuntu 13.04; Intel-HDA & ALSA sound driver

A recent update to the pulseaudio package included with Ubuntu 13.04 (Raring Ringtail) and Kubuntu 13.04 may be causing some users to experience a persistent background noise, or hum. It appears that this particular bug will affect VLC, Skype, and possibly other applications which emit audio. This problem is primarily affecting Intel-HDA (high definition audio) chipsets and ALSA sound drivers in regards to "glitch-free" PA (pulse audio).

Below is the current suggested workaround. It requires you to modify a line in the default pulse audio configuration file.

  1. Modify the following line in /etc/pulse/default.pa:                                                                                
    fix ubuntu 13.04 kubuntu 13.04 static background noise; gedit /etc/pulse/default.pa
    (Start a session of Terminal and use gedit to edit the pulse audio file.)
       
  2. In line 53 of /etc/pulse/default.pa change use_ucm=0 to tsched=0 
     
Edit line 53 of pulse audio default.pa file Ubuntu 13.04
(The line to edit is line 53)

3. Save Edits and Close the default.pa file.

**bug 751265

Thursday, June 20, 2013

Remove "Unlock Keyring" Prompt: Ubuntu 11.04, 11.10, 12.04, 12.10


Whenever Ubuntu boots up, if you are not using a password for login, the user is prompted to unlock the Keyring. This can be annoying especially if you are running Ubuntu on a private computer, such as a laptop, where no one else will have access to it. The rest of this article will focus on showing you how to remove the Unlock Login Keyring prompt for many of the most recent releases of Ubuntu. 

Make Keyring Accessible Without Password:

In order to remove the Unlock Login Keyring dialog set the password for the keyring to an empty password. This prevents being prompted for a password. 
  1. Open Applications --> Accessories -->Password and Encryption Keys
  2. Right-click on the "login" keyring
  3. Select "Change Password"
  4. Enter your old password and leave the new password blank
  5. Press ok, read the security warning, think about it and if you still want to get rid of the Unlock Login Keyring dialog, choose "use unsafe storage"
As the message states: This will expose all passwords saved in the keyring (e.g. email passwords) to anyone using your computer or having access to your files and is not recommended. 
Ubuntu 11.04
You can use the search box to find Passwords and Encryption Keys by typing Password in the search box and pressing search.

Thursday, June 13, 2013

Ubuntu Add User to Sudoers

Sudo Users in Ubuntu
Sudo vs Adminstrator Groups
Add User to Sudoers
Add Administrator User

Ubuntu Sudo Users

All members of the group admin, are in Ubuntu by default allowed to use sudo, so the easiest way is to add the user account to the admin group.

If you do not want to give the user account full root access, you need to edit the /etc/sudoer file with visudo (it makes sure that you do not have any syntax errors in the file and lose sudo capability altogether) in a way that you specify what commands this user (or a new group) can execute as root.

The sudoer manual will give you more information about this. You can specify which commands are permitted by a particular user/group to be executed as root.

Difference between Sudo and Admin Groups:


Administrators are added to the sudo group, but the admin group is supported for backward compatibility. From the release notes:
Up until Ubuntu 11.10, administrator access using the sudo tool was granted via the admin Unix group. In Ubuntu 12.04, administrator access will be granted via the sudo group. This makes Ubuntu more consistent with the upstream implementation and Debian. For compatibility purposes, theadmin group will continue to provide sudo/administrator access in 12.04.
It is not created when you do a fresh install, though it is still present if you upgraded from previous distributions. Either way, the admin group appears in the /etc/sudoers file.
sudo adduser <username> sudo

This works because /etc/sudoers is pre-configured to grant permissions to all members of this group (You should not have to make any changes to this):
# Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL

As long as you have access to a user that is in the same groups as your "original" user, you can delete the old one.

Realistically, there are also other groups your new user should be a member of. If you set the Account type of a user to Administrator in Users Settings, it will be placed in at least all of these groups:
adm sudo lpadmin sambashare
Because your system configuration may vary, I suggest taking a look at the output of groups <username> to see what groups are normally in use.


Add new Administrator User


Ubuntu system preferences Icon from the dock
Ubuntu sudo users can also be added in the user accounts pane of system preferences in Ubuntu 12.04 LTS and later. This is an easy way to add a user as a sudo user or system administrator.

Step 1. Click on the system preferences icon in the dock.
Step 2.  Click on the User Accounts button.
Step 3. Unlock user accounts by clicking the unlock button.

Ubuntu Add user to sudoers and add user as administrator

Step 3.a When prompted enter the password for your user account.

Step 4.  Under the My Account table select the + .

Unlock ubuntu user accounts pane with administrative password of any user


Step 4.a Select the type of account as Administrator.
selecting the account type as administrator

Step 4.b Enter the Full name of the user and create a user name or use the default. Then click Create.
creating an administrator account Ubuntu
Step 5. Now that the user has been created a password must be created for it.
create password for new sudo user account disabled

Step 5.a Click on Account Disabled, then enter a password for the new user and click change.
ubuntu password strength

Finish The new user will now be able to make administrative changes as a sudoer.
use another sudo user to authenticate


Source: StackExchange


Related Posts:

Wednesday, June 12, 2013

Add directory ~bin to PATH Ubuntu

Create a new directory in your PATH in Ubuntu with terminal

What is $PATH


$PATH is an environment variable used to lookup commands. The ~ is your home directory, so ~/bin will be /home/user/bin; it is a normal directory.

What is bin

When you run "ls" in a shell, for example, you actually run the /bin/ls program; the exact location may differ depending on your system configuration. This happens because /bin is in your $PATH.


$ echo $PATH
/home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:...
$ which ls     # searches $PATH for an executable named "ls"
/bin/ls
$ ls           # runs /bin/ls
bin  desktop  documents  downloads  examples.desktop  music  pictures  ...
$ /bin/ls      # can also run directly
bin  desktop  documents  downloads  examples.desktop  music  pictures  ...


Create Private bin directory

To have your own private bin directory, you only need to add it to the path. Do this by editing ~/.profile (a hidden file) to include the below lines. If the lines are commented, you only have to uncomment them; if they are already there, you're all set!


# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ]; then
  PATH="$HOME/bin:$PATH"
fi


Create ~/bin directory

Now you need to create your ~/bin directory and, because .profile is run on login and only adds ~/bin if it exists at that time, you need to login again to see the updated PATH.


$ ln -s $(which ls) ~/bin/my-ls   # symlink
$ which my-ls
/home/user/bin/my-ls
$ my-ls -l ~/bin/my-ls
lrwxrwxrwx 1 user user 7 2010-10-27 18:56 my-ls -> /bin/ls
$ my-ls          # lookup through $PATH
bin  desktop  documents  downloads  examples.desktop  music  pictures  ...
$ ~/bin/my-ls    # doesn't use $PATH to lookup
bin  desktop  documents  downloads  examples.desktop  music  pictures  ...


One thing to watch out for when using which is that it will only find commands that are binaries in the filesystem, it does not report shell builtin, aliases, or functions. Often, it's more useful to use type to see how an actual command will be resolved by the shell; e.g.: which echo and type echo will report different things, which returns '/bin/echo' but 'type' returns that it's a shell builtin, which the shell will prefer over the file in '/bin'.

"Which" is better replaced by type or command in interactive shells, and it's completely useless in scripts.
Related Posts Plugin for WordPress, Blogger...